rename pdf2d to draw2dpdf

This commit is contained in:
Stani 2015-07-07 00:25:24 +02:00
parent 96e73eab52
commit dbd88a6569
8 changed files with 15 additions and 15 deletions

View file

@ -1,5 +1,5 @@
// Copyright 2015 The draw2d Authors. All rights reserved.
// created: 26/06/2015 by Stani Michiels
// Package pdf2d provides a Graphic Context that can draw vector form on pdf file.
package pdf2d
// Package draw2dpdf provides a Graphic Context that can draw vector form on pdf file.
package draw2dpdf

View file

@ -1,4 +1,4 @@
package pdf2d
package draw2dpdf
import "github.com/jung-kurt/gofpdf"

View file

@ -2,7 +2,7 @@
// created: 26/06/2015 by Stani Michiels
// TODO: fonts, dpi
package pdf2d
package draw2dpdf
import (
"bytes"

View file

@ -1,4 +1,4 @@
package pdf2d
package draw2dpdf
import (
"fmt"
@ -28,7 +28,7 @@ func ExampleGraphicContext() {
gc.FillStroke()
fmt.Println(gc.LastPoint())
// pdf2d.SaveToPdfFile("example.pdf", pdf)
// draw2dpdf.SaveToPdfFile("example.pdf", pdf)
// Output:
// 10 10

View file

@ -1,7 +1,7 @@
// Copyright 2015 The draw2d Authors. All rights reserved.
// created: 26/06/2015 by Stani Michiels
package pdf2d
package draw2dpdf
import (
"math"

View file

@ -1,6 +1,6 @@
// See also test_test.go
package pdf2d_test
package draw2dpdf_test
import (
"testing"

View file

@ -1,20 +1,20 @@
// Package pdf2d_test gives test coverage with the command:
// Package draw2dpdf_test gives test coverage with the command:
// go test -cover ./... | grep -v "no test"
// (It should be run from its parent draw2d directory.)
package pdf2d_test
package draw2dpdf_test
import (
"os"
"testing"
"github.com/llgcode/draw2d"
"github.com/llgcode/draw2d/pdf2d"
"github.com/llgcode/draw2d/draw2dpdf"
)
func test(t *testing.T, sample draw2d.Sample) {
// Initialize the graphic context on an pdf document
dest := pdf2d.NewPdf("L", "mm", "A4")
gc := pdf2d.NewGraphicContext(dest)
dest := draw2dpdf.NewPdf("L", "mm", "A4")
gc := draw2dpdf.NewGraphicContext(dest)
// Draw sample
fn, err := sample(gc, "pdf")
if err != nil {
@ -26,7 +26,7 @@ func test(t *testing.T, sample draw2d.Sample) {
t.Skipf("Saving %q skipped, as it exists already. (Git would consider it modified.)", fn)
return
}
err = pdf2d.SaveToPdfFile(fn, dest)
err = draw2dpdf.SaveToPdfFile(fn, dest)
if err != nil {
t.Errorf("Saving %q failed: %v", fn, err)
}

View file

@ -1,7 +1,7 @@
// Copyright 2015 The draw2d Authors. All rights reserved.
// created: 26/06/2015 by Stani Michiels
package pdf2d
package draw2dpdf
// Vectorizer defines the minimal interface for gofpdf.Fpdf
// to be passed to a PathConvertor.