prototyped svg reports
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Tests / Go tests (push) Failing after 15s

This commit is contained in:
2026-08-20 00:23:54 -06:00
parent 55a3694d89
commit fb2f4255f4
106 changed files with 5450 additions and 46 deletions
+130
View File
@@ -0,0 +1,130 @@
package svg
import (
"bytes"
"html"
"io"
)
type (
// Text models an <text> element
Text = Element[TextTag, TextAttribute, TextChild]
TextTag struct{}
TextAttribute interface {
Attribute
IsTextAttribute()
}
TextChild interface {
MarshalerReader
IsTextChild()
}
RawText string
)
func NewText(t string) *Text {
return &Text{
Children: []TextChild{
RawText(t),
},
}
}
func (t TextTag) PrintTag() string {
return "text"
}
func (t RawText) GetMarkup() string {
return html.EscapeString(string(t))
}
func (t RawText) GetMarkupReader() io.Reader {
return bytes.NewReader([]byte(t.GetMarkup()))
}
func (t RawText) IsTextChild() {
}
func (X) IsTextAttribute() {
}
func (XP) IsTextAttribute() {
}
func (Y) IsTextAttribute() {
}
func (YP) IsTextAttribute() {
}
func (DX) IsTextAttribute() {
}
func (DXP) IsTextAttribute() {
}
func (DY) IsTextAttribute() {
}
func (DYP) IsTextAttribute() {
}
func (Rotate) IsTextAttribute() {
}
func (RotateAuto) IsTextAttribute() {
}
func (RotateAutoReverse) IsTextAttribute() {
}
func (Fill) IsTextAttribute() {
}
func (TextLength) IsTextAttribute() {
}
func (TextLengthP) IsTextAttribute() {
}
func (LengthAdjust) IsTextAttribute() {
}
func (TextAnchor) IsTextAttribute() {
}
func (FontSize) IsTextAttribute() {
}
func (FontSizeP) IsTextAttribute() {
}
func (Transform) IsTextAttribute() {
}
func (TransformRotate) IsTextAttribute() {
}
func (TransformRotateAbout) IsTextAttribute() {
}
func (TransformTranslate) IsTextAttribute() {
}
func (TransformSkewX) IsTextAttribute() {
}
func (TransformSkewY) IsTextAttribute() {
}
func (TransformScale) IsTextAttribute() {
}
func (DominantBaseline) IsTextAttribute() {
}
func (Style) IsTextAttribute() {
}
func (Class) IsTextAttribute() {
}