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