Source File
len.go
Belonging Package
gonum.org/v1/plot/vg
// Copyright ©2015 The Gonum Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.package vgimport// A Length is a unit-independent representation of length.// Internally, the length is stored in postscript points.type Length = font.Length// Points returns a length for the given number of points.func ( float64) Length {return font.Points()}// Common lengths.const (Inch = font.InchCentimeter = font.CentimeterMillimeter = font.Millimeter)// ParseLength parses a Length string.// A Length string is a possible signed floating number with a unit.// e.g. "42cm" "2.4in" "66pt"// If no unit was given, ParseLength assumes it was (postscript) points.// Currently valid units are://// - mm (millimeter)// - cm (centimeter)// - in (inch)// - pt (point)func ( string) (Length, error) {return font.ParseLength()}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |