51 lines
1018 B
Go
51 lines
1018 B
Go
package svg
|
|
|
|
import "fmt"
|
|
|
|
type (
|
|
DominantBaseline int
|
|
)
|
|
|
|
const (
|
|
DominantBaselineAuto DominantBaseline = iota
|
|
DominantBaselineTextBottom
|
|
DominantBaselineAlphabetic
|
|
DominantBaselineIdeographic
|
|
DominantBaselineMiddle
|
|
DominantBaselineCentral
|
|
DominantBaselineMathematical
|
|
DominantBaselineHanging
|
|
DominantBaselineTextTop
|
|
)
|
|
|
|
func (a DominantBaseline) PrintValue() (string, bool) {
|
|
return fmt.Sprintf("%q", a), true
|
|
}
|
|
|
|
func (a DominantBaseline) PrintKey() string {
|
|
return "dominant-baseline"
|
|
}
|
|
|
|
func (a DominantBaseline) String() string {
|
|
switch a {
|
|
case DominantBaselineTextBottom:
|
|
return "text-bottom"
|
|
case DominantBaselineAlphabetic:
|
|
return "alphabetic"
|
|
case DominantBaselineIdeographic:
|
|
return "ideographic"
|
|
case DominantBaselineMiddle:
|
|
return "middle"
|
|
case DominantBaselineCentral:
|
|
return "central"
|
|
case DominantBaselineMathematical:
|
|
return "mathematical"
|
|
case DominantBaselineHanging:
|
|
return "hanging"
|
|
case DominantBaselineTextTop:
|
|
return "text-top"
|
|
default:
|
|
return "auto"
|
|
}
|
|
}
|