diff --git a/svg/css.go b/svg/css.go index 8481f32..fbe977f 100644 --- a/svg/css.go +++ b/svg/css.go @@ -66,7 +66,6 @@ func (s *style) parseCSS(src string) { for _, pair := range pairs { before, after, ok := strings.Cut(pair, ":") if !ok { - fmt.Println("not ok", pair) continue } before = strings.TrimSpace(before) diff --git a/svg/decode.go b/svg/decode.go index 530d2c0..4e09ccf 100644 --- a/svg/decode.go +++ b/svg/decode.go @@ -165,7 +165,6 @@ func Paint(cs *gdf.ContentStream, closePath bool, s style) { } func Render(root element, cs *gdf.ContentStream, h float64) { - //fmt.Println(reflect.TypeOf(root), root) switch root.Category() { case CAT_STRUCTRUAL: for _, child := range root.Children() { @@ -263,9 +262,7 @@ func Decode(r io.Reader) (gdf.XContent, error) { c.Parse(val.Attr) c.style = style if id != "" { - fmt.Println("hey", id) defmap[id] = c - fmt.Println(defmap) } root.element.AddChild(c) case "ellipse": @@ -317,7 +314,6 @@ func Decode(r io.Reader) (gdf.XContent, error) { } root.element.AddChild(r) default: - //fmt.Println(val.Name) } case xml.EndElement: diff --git a/svg/graphics.go b/svg/graphics.go index d1ed0fb..b006238 100644 --- a/svg/graphics.go +++ b/svg/graphics.go @@ -2,7 +2,6 @@ package svg import ( "encoding/xml" - "fmt" "strconv" "github.com/cdillond/gdf" @@ -374,7 +373,6 @@ func (p polygon) Draw(cs *gdf.ContentStream, h float64) { for fs := b.ConsumeNumber(); fs != ""; fs = b.ConsumeNumber() { f64, err := strconv.ParseFloat(fs, 64) if err != nil { - fmt.Println(err.Error()) break } points = append(points, f64) @@ -468,7 +466,6 @@ func (p polyline) Draw(cs *gdf.ContentStream, h float64) { for fs := b.ConsumeNumber(); fs != ""; fs = b.ConsumeNumber() { f64, err := strconv.ParseFloat(fs, 64) if err != nil { - fmt.Println(err.Error()) break } points = append(points, f64) @@ -567,7 +564,6 @@ func (r rect) Draw(cs *gdf.ContentStream, h float64) { x, y = tf(x+r.xOff, y+r.yOff, h, r.Matrix) cs.Re(x, y, width, height) Paint(cs, false, r.style) // path is already closed - fmt.Println(cs) } func (r rect) Children() []element { return nil } diff --git a/svg/structural.go b/svg/structural.go index de6a84a..df12fc1 100644 --- a/svg/structural.go +++ b/svg/structural.go @@ -2,7 +2,6 @@ package svg import ( "encoding/xml" - "fmt" "github.com/cdillond/gdf" ) @@ -176,7 +175,6 @@ func (u use) Draw(cs *gdf.ContentStream, h float64) {} func (u use) Children() []element { var e element if u.href != "" { - fmt.Println(u.href, u.href[1:]) e = defmap[u.href[1:]] } if e == nil { @@ -237,7 +235,6 @@ func (u *use) Parse(attrs []xml.Attr) { u.y = a.Value case "href": u.href = a.Value - fmt.Println(u) } } }