Skip to content

Commit

Permalink
started fixing vectorview errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Feb 24, 2024
1 parent 2e5b985 commit 6df1298
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 162 deletions.
39 changes: 39 additions & 0 deletions vector/gtigen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 12 additions & 11 deletions vector/svgview.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,40 +31,41 @@ type SVGView struct {
gi.SVG

// the parent vectorview
VectorView *VectorView `copier:"-" json:"-" xml:"-" view:"-"`
VectorView *VectorView `copier:"-" json:"-" xml:"-" view:"-" set:"-"`

// view translation offset (from dragging)
Trans mat32.Vec2
Trans mat32.Vec2 `set:"-"`

// view scaling (from zooming)
Scale float32
Scale float32 `set:"-"`

// grid spacing, in native ViewBox units
Vector float32
Vector float32 ` set:"-"`

// effective grid spacing given Scale level
VectorEff float32 `view:"inactive"`
VectorEff float32 `edit:"-" set:"-"`

// has dragging cursor been set yet?
SetDragCursor bool `view:"-"`
SetDragCursor bool `view:"-" set:"-"`

// background pixels, includes page outline and grid
BgPixels *image.RGBA `copier:"-" json:"-" xml:"-" view:"-"`
BgPixels *image.RGBA `copier:"-" json:"-" xml:"-" view:"-" set:"-"`

// render state for background rendering
// BgRender girl.State `copier:"-" json:"-" xml:"-" view:"-"`
// BgRender girl.State `copier:"-" json:"-" xml:"-" view:"-" set:"-"`

// bg rendered translation
bgTrans mat32.Vec2 `copier:"-" json:"-" xml:"-" view:"-"`
bgTrans mat32.Vec2 `copier:"-" json:"-" xml:"-" view:"-" set:"-"`

// bg rendered scale
bgScale float32 `copier:"-" json:"-" xml:"-" view:"-"`
bgScale float32 `copier:"-" json:"-" xml:"-" view:"-" set:"-"`

// bg rendered grid
bgVectorEff float32 `copier:"-" json:"-" xml:"-" view:"-"`
bgVectorEff float32 `copier:"-" json:"-" xml:"-" view:"-" set:"-"`
}

func (sv *SVGView) OnInit() {
sv.SVG.OnInit()
sv.Vector = Prefs.Size.Vector
sv.Scale = 1
}
Expand Down
Loading

0 comments on commit 6df1298

Please sign in to comment.