MCPcopy
hub / github.com/tdewolff/canvas / W

Method W

util.go:404–406  ·  view source on GitHub ↗

W returns the width of the rectangle.

()

Source from the content-addressed store, hash-verified

402
403// W returns the width of the rectangle.
404func (r Rect) W() float64 {
405 return r.X1 - r.X0
406}
407
408// H returns the height of the rectangle.
409func (r Rect) H() float64 {

Callers 11

EmptyMethod · 0.95
renderBlockMethod · 0.80
parseDefsMethod · 0.80
TestTextBoundsFunction · 0.80
BenchmarkToRasterizerFunction · 0.80
BenchmarkToScanxFunction · 0.80
SetCoordRectMethod · 0.80
FitImageMethod · 0.80
ClipMethod · 0.80
DrawImageMethod · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by 3

TestTextBoundsFunction · 0.64
BenchmarkToRasterizerFunction · 0.64
BenchmarkToScanxFunction · 0.64