use gopkg.in/llgcode/draw2d.v1 import
This commit is contained in:
parent
ce9c7f76f7
commit
2745c863f9
23 changed files with 56 additions and 56 deletions
|
@ -11,7 +11,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d/raster"
|
"gopkg.in/llgcode/draw2d.v1/raster"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
// Installation
|
// Installation
|
||||||
//
|
//
|
||||||
// To install or update the package draw2d on your system, run:
|
// To install or update the package draw2d on your system, run:
|
||||||
// go get -u github.com/llgcode/draw2d
|
// go get -u gopkg.in/llgcode/draw2d.v1
|
||||||
//
|
//
|
||||||
// Quick Start
|
// Quick Start
|
||||||
//
|
//
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
// draw2d.SaveToPngFile("hello.png", dest)
|
// draw2d.SaveToPngFile("hello.png", dest)
|
||||||
//
|
//
|
||||||
// There are more examples here:
|
// There are more examples here:
|
||||||
// https://github.com/llgcode/draw2d/tree/master/samples
|
// https://gopkg.in/llgcode/draw2d.v1/tree/master/samples
|
||||||
//
|
//
|
||||||
// Drawing on pdf documents is provided by the draw2dpdf package.
|
// Drawing on pdf documents is provided by the draw2dpdf package.
|
||||||
// Drawing on opengl is provided by the draw2dgl package.
|
// Drawing on opengl is provided by the draw2dgl package.
|
||||||
|
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
"code.google.com/p/freetype-go/freetype/raster"
|
"code.google.com/p/freetype-go/freetype/raster"
|
||||||
"github.com/go-gl/gl/v2.1/gl"
|
"github.com/go-gl/gl/v2.1/gl"
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
// draw2dpdf.SaveToPdfFile("hello.pdf", dest)
|
// draw2dpdf.SaveToPdfFile("hello.pdf", dest)
|
||||||
//
|
//
|
||||||
// There are more examples here:
|
// There are more examples here:
|
||||||
// https://github.com/llgcode/draw2d/tree/master/samples
|
// https://gopkg.in/llgcode/draw2d.v1/tree/master/samples
|
||||||
//
|
//
|
||||||
// Alternative backends
|
// Alternative backends
|
||||||
//
|
//
|
||||||
|
|
|
@ -17,7 +17,7 @@ import (
|
||||||
"code.google.com/p/freetype-go/freetype/truetype"
|
"code.google.com/p/freetype-go/freetype/truetype"
|
||||||
|
|
||||||
"github.com/jung-kurt/gofpdf"
|
"github.com/jung-kurt/gofpdf"
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -6,7 +6,7 @@ package draw2dpdf
|
||||||
import (
|
import (
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
const deg = 180 / math.Pi
|
const deg = 180 / math.Pi
|
||||||
|
|
|
@ -7,16 +7,16 @@ package draw2dpdf_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/samples/android"
|
"gopkg.in/llgcode/draw2d.v1/samples/android"
|
||||||
"github.com/llgcode/draw2d/samples/frameimage"
|
"gopkg.in/llgcode/draw2d.v1/samples/frameimage"
|
||||||
"github.com/llgcode/draw2d/samples/geometry"
|
"gopkg.in/llgcode/draw2d.v1/samples/geometry"
|
||||||
"github.com/llgcode/draw2d/samples/gopher"
|
"gopkg.in/llgcode/draw2d.v1/samples/gopher"
|
||||||
"github.com/llgcode/draw2d/samples/gopher2"
|
"gopkg.in/llgcode/draw2d.v1/samples/gopher2"
|
||||||
"github.com/llgcode/draw2d/samples/helloworld"
|
"gopkg.in/llgcode/draw2d.v1/samples/helloworld"
|
||||||
"github.com/llgcode/draw2d/samples/line"
|
"gopkg.in/llgcode/draw2d.v1/samples/line"
|
||||||
"github.com/llgcode/draw2d/samples/linecapjoin"
|
"gopkg.in/llgcode/draw2d.v1/samples/linecapjoin"
|
||||||
"github.com/llgcode/draw2d/samples/postscript"
|
"gopkg.in/llgcode/draw2d.v1/samples/postscript"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSampleAndroid(t *testing.T) {
|
func TestSampleAndroid(t *testing.T) {
|
||||||
|
|
|
@ -9,8 +9,8 @@ package draw2dpdf_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/draw2dpdf"
|
"gopkg.in/llgcode/draw2d.v1/draw2dpdf"
|
||||||
)
|
)
|
||||||
|
|
||||||
type sample func(gc draw2d.GraphicContext, ext string) (string, error)
|
type sample func(gc draw2d.GraphicContext, ext string) (string, error)
|
||||||
|
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/freetype-go/freetype/raster"
|
"code.google.com/p/freetype-go/freetype/raster"
|
||||||
"github.com/llgcode/draw2d/curve"
|
"gopkg.in/llgcode/draw2d.v1/curve"
|
||||||
)
|
)
|
||||||
|
|
||||||
var flatteningThreshold = 0.5
|
var flatteningThreshold = 0.5
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"image/color"
|
"image/color"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/samples"
|
"gopkg.in/llgcode/draw2d.v1/samples"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Main draws a droid and returns the filename. This should only be
|
// Main draws a droid and returns the filename. This should only be
|
||||||
|
|
|
@ -9,9 +9,9 @@ import (
|
||||||
"image/png"
|
"image/png"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/draw2dpdf"
|
"gopkg.in/llgcode/draw2d.v1/draw2dpdf"
|
||||||
"github.com/llgcode/draw2d/samples/android"
|
"gopkg.in/llgcode/draw2d.v1/samples/android"
|
||||||
|
|
||||||
"appengine"
|
"appengine"
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,8 +7,8 @@ package frameimage
|
||||||
import (
|
import (
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/samples"
|
"gopkg.in/llgcode/draw2d.v1/samples"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Main draws the image frame and returns the filename.
|
// Main draws the image frame and returns the filename.
|
||||||
|
|
|
@ -9,9 +9,9 @@ import (
|
||||||
"image/color"
|
"image/color"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/samples"
|
"gopkg.in/llgcode/draw2d.v1/samples"
|
||||||
"github.com/llgcode/draw2d/samples/gopher2"
|
"gopkg.in/llgcode/draw2d.v1/samples/gopher2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Main draws geometry and returns the filename. This should only be
|
// Main draws geometry and returns the filename. This should only be
|
||||||
|
|
|
@ -8,8 +8,8 @@ package gopher
|
||||||
import (
|
import (
|
||||||
"image/color"
|
"image/color"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/samples"
|
"gopkg.in/llgcode/draw2d.v1/samples"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Main draws a left hand and ear of a gopher. Afterwards it returns
|
// Main draws a left hand and ear of a gopher. Afterwards it returns
|
||||||
|
|
|
@ -10,8 +10,8 @@ import (
|
||||||
"image/color"
|
"image/color"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/samples"
|
"gopkg.in/llgcode/draw2d.v1/samples"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Main draws a rotated face of the gopher. Afterwards it returns
|
// Main draws a rotated face of the gopher. Afterwards it returns
|
||||||
|
|
|
@ -11,8 +11,8 @@ import (
|
||||||
"image/color"
|
"image/color"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/samples"
|
"gopkg.in/llgcode/draw2d.v1/samples"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Main draws "Hello World" and returns the filename. This should only be
|
// Main draws "Hello World" and returns the filename. This should only be
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
|
|
||||||
"github.com/go-gl/gl/v2.1/gl"
|
"github.com/go-gl/gl/v2.1/gl"
|
||||||
"github.com/go-gl/glfw/v3.1/glfw"
|
"github.com/go-gl/glfw/v3.1/glfw"
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/draw2dgl"
|
"gopkg.in/llgcode/draw2d.v1/draw2dgl"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -7,8 +7,8 @@ package line
|
||||||
import (
|
import (
|
||||||
"image/color"
|
"image/color"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/samples"
|
"gopkg.in/llgcode/draw2d.v1/samples"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Main draws vertically spaced lines and returns the filename.
|
// Main draws vertically spaced lines and returns the filename.
|
||||||
|
|
|
@ -7,8 +7,8 @@ package linecapjoin
|
||||||
import (
|
import (
|
||||||
"image/color"
|
"image/color"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/samples"
|
"gopkg.in/llgcode/draw2d.v1/samples"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Main draws the different line caps and joins.
|
// Main draws the different line caps and joins.
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
|
|
||||||
"github.com/llgcode/ps"
|
"github.com/llgcode/ps"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/samples"
|
"gopkg.in/llgcode/draw2d.v1/samples"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Main draws the tiger
|
// Main draws the tiger
|
||||||
|
|
|
@ -12,7 +12,7 @@ import (
|
||||||
|
|
||||||
"github.com/go-gl/gl/v2.1/gl"
|
"github.com/go-gl/gl/v2.1/gl"
|
||||||
"github.com/go-gl/glfw/v3.1/glfw"
|
"github.com/go-gl/glfw/v3.1/glfw"
|
||||||
"github.com/llgcode/draw2d/draw2dgl"
|
"gopkg.in/llgcode/draw2d.v1/draw2dgl"
|
||||||
"github.com/llgcode/ps"
|
"github.com/llgcode/ps"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,16 +5,16 @@ package draw2d_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
"github.com/llgcode/draw2d/samples/android"
|
"gopkg.in/llgcode/draw2d.v1/samples/android"
|
||||||
"github.com/llgcode/draw2d/samples/frameimage"
|
"gopkg.in/llgcode/draw2d.v1/samples/frameimage"
|
||||||
"github.com/llgcode/draw2d/samples/geometry"
|
"gopkg.in/llgcode/draw2d.v1/samples/geometry"
|
||||||
"github.com/llgcode/draw2d/samples/gopher"
|
"gopkg.in/llgcode/draw2d.v1/samples/gopher"
|
||||||
"github.com/llgcode/draw2d/samples/gopher2"
|
"gopkg.in/llgcode/draw2d.v1/samples/gopher2"
|
||||||
"github.com/llgcode/draw2d/samples/helloworld"
|
"gopkg.in/llgcode/draw2d.v1/samples/helloworld"
|
||||||
"github.com/llgcode/draw2d/samples/line"
|
"gopkg.in/llgcode/draw2d.v1/samples/line"
|
||||||
"github.com/llgcode/draw2d/samples/linecapjoin"
|
"gopkg.in/llgcode/draw2d.v1/samples/linecapjoin"
|
||||||
"github.com/llgcode/draw2d/samples/postscript"
|
"gopkg.in/llgcode/draw2d.v1/samples/postscript"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSampleAndroid(t *testing.T) {
|
func TestSampleAndroid(t *testing.T) {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"image"
|
"image"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/llgcode/draw2d"
|
"gopkg.in/llgcode/draw2d.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
type sample func(gc draw2d.GraphicContext, ext string) (string, error)
|
type sample func(gc draw2d.GraphicContext, ext string) (string, error)
|
||||||
|
|
Loading…
Reference in a new issue