25 lines
399 B
Go
25 lines
399 B
Go
package svg
|
|
|
|
type (
|
|
Height struct {
|
|
*LengthAttr[HeightTag]
|
|
}
|
|
HeightP struct {
|
|
PercentageAttr[HeightTag]
|
|
}
|
|
|
|
HeightTag struct{}
|
|
)
|
|
|
|
func (l *Length) AsHeight() Height {
|
|
return Height{LengthAttr: (*LengthAttr[HeightTag])(l)}
|
|
}
|
|
|
|
func (p Percentage) AsHeightP() HeightP {
|
|
return HeightP{PercentageAttr: (PercentageAttr[HeightTag])(p)}
|
|
}
|
|
|
|
func (HeightTag) PrintTag() string {
|
|
return "height"
|
|
}
|