This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user