Skip to content

Commit

Permalink
removed debug print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
cdillond committed Jul 10, 2024
1 parent c506def commit f439eef
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion svg/css.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions svg/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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":
Expand Down Expand Up @@ -317,7 +314,6 @@ func Decode(r io.Reader) (gdf.XContent, error) {
}
root.element.AddChild(r)
default:
//fmt.Println(val.Name)
}

case xml.EndElement:
Expand Down
4 changes: 0 additions & 4 deletions svg/graphics.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package svg

import (
"encoding/xml"
"fmt"
"strconv"

"github.com/cdillond/gdf"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 }
Expand Down
3 changes: 0 additions & 3 deletions svg/structural.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package svg

import (
"encoding/xml"
"fmt"

"github.com/cdillond/gdf"
)
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -237,7 +235,6 @@ func (u *use) Parse(attrs []xml.Attr) {
u.y = a.Value
case "href":
u.href = a.Value
fmt.Println(u)
}
}
}

0 comments on commit f439eef

Please sign in to comment.