@@ -21,8 +21,6 @@ import (
2121 "encoding/hex"
2222 "fmt"
2323 "strconv"
24-
25- "github.com/pkg/errors"
2624)
2725
2826// Supported line delimiters
@@ -172,32 +170,6 @@ func NewRectangle(llx, lly, urx, ury float64) *Rectangle {
172170 return & Rectangle {LL : Point {llx , lly }, UR : Point {urx , ury }}
173171}
174172
175- // RectForArray returns a new rectangle for given Array.
176- func RectForArray (a Array ) (* Rectangle , error ) {
177-
178- llx , err := a .FloatNumber (0 )
179- if err != nil {
180- return nil , err
181- }
182-
183- lly , err := a .FloatNumber (1 )
184- if err != nil {
185- return nil , err
186- }
187-
188- urx , err := a .FloatNumber (2 )
189- if err != nil {
190- return nil , err
191- }
192-
193- ury , err := a .FloatNumber (3 )
194- if err != nil {
195- return nil , err
196- }
197-
198- return NewRectangle (llx , lly , urx , ury ), nil
199- }
200-
201173// RectForDim returns a new rectangle for given dimensions.
202174func RectForDim (width , height float64 ) * Rectangle {
203175 return NewRectangle (0.0 , 0.0 , width , height )
@@ -349,19 +321,6 @@ func (r Rectangle) Format(unit DisplayUnit) string {
349321 return r .String ()
350322}
351323
352- // FloatNumber returns the element at index ind of a numbers array and returns a float64.
353- func (a Array ) FloatNumber (ind int ) (float64 , error ) {
354- f , ok := a [ind ].(Float )
355- if ok {
356- return f .Value (), nil
357- }
358- i , ok := a [ind ].(Integer )
359- if ok {
360- return float64 (i .Value ()), nil
361- }
362- return 0 , errors .Errorf ("pdfcpu: array element %d not a number (Float/Integer" , ind )
363- }
364-
365324///////////////////////////////////////////////////////////////////////////////////
366325
367326// QuadLiteral is a polygon with four edges and four vertices.
0 commit comments