Skip to content

Commit

Permalink
rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitkugler committed Oct 24, 2024
1 parent 4ff31f8 commit 032fc35
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pdf/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (g *group) SetColorPattern(p backend.Canvas, contentWidth, contentHeight fl
mat = mat.Multiply(g.app.State.Matrix)

// initiate the pattern ...
_, _, gridWidth, gridHeight := p.GetRectangle()
_, _, gridWidth, gridHeight := p.GetBoundingBox()
pattern := &model.PatternTiling{
XStep: gridWidth, YStep: gridHeight,
Matrix: mat,
Expand Down Expand Up @@ -224,11 +224,20 @@ func (cp *outputPage) SetBleedBox(left fl, top fl, right fl, bottom fl) {
// graphic operations

// Returns the current page rectangle
func (g *group) GetRectangle() (left fl, top fl, right fl, bottom fl) {
func (g *group) GetBoundingBox() (left, top, right, bottom fl) {
bbox := g.app.BoundingBox
return bbox.Llx, bbox.Lly, bbox.Urx, bbox.Ury
}

// Updates the current page rectangle
func (g *group) SetBoundingBox(left, top, right, bottom fl) {
bbox := &g.app.BoundingBox
bbox.Llx = left
bbox.Lly = top
bbox.Urx = right
bbox.Ury = bottom
}

// OnNewStack save the current graphic stack,
// execute the given closure, and restore the stack.
// If an error is encoutered, the stack is still restored
Expand Down

0 comments on commit 032fc35

Please sign in to comment.