From 5c3d717c55e3a9cadd924d6b20eab99f8f9615ba Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Wed, 29 Jan 2014 11:38:29 -0500 Subject: Name changes for Lint conformance. One key advantage of the camelback naming convention is that a machine can quickly tokenize name segments for indexing and tagging purposes. For example, HtmlWrite easily breaks into Html and Write. By capitalizing all letters in an initialism, this name breaks into H, T, M, L, and Write -- not as useful for tagging purposes. Rather than having to manually filter through the mostly valuable output of golint, I have grudgingly changed names so that golint produces no output. --- svgwrite.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'svgwrite.go') diff --git a/svgwrite.go b/svgwrite.go index ea445c1..a2213a2 100644 --- a/svgwrite.go +++ b/svgwrite.go @@ -16,7 +16,7 @@ package gofpdf -// SvgBasicWrite renders the paths encoded in the basic SVG image specified by +// SVGBasicWrite renders the paths encoded in the basic SVG image specified by // sb. The scale value is used to convert the coordinates in the path to the // unit of measure specified in New(). The current position (as set with a call // to SetXY()) is used as the origin of the image. The current line cap style @@ -25,12 +25,12 @@ package gofpdf // paths. // // See example 20 for a demonstration of this function. -func (f *Fpdf) SvgBasicWrite(sb *SvgBasicType, scale float64) { +func (f *Fpdf) SVGBasicWrite(sb *SVGBasicType, scale float64) { originX, originY := f.GetXY() var x, y, newX, newY float64 var cx0, cy0, cx1, cy1 float64 - var path []SvgBasicSegmentType - var seg SvgBasicSegmentType + var path []SVGBasicSegmentType + var seg SVGBasicSegmentType val := func(arg int) (float64, float64) { return originX + scale*seg.Arg[arg], originY + scale*seg.Arg[arg+1] } -- cgit v1.2.1-24-ge1ad