Change import paths

This commit is contained in:
Hamcha 2018-11-16 12:21:14 +01:00
parent f52c8a71af
commit 219501b99b
Signed by: hamcha
GPG key ID: A40413D21021EAEE
31 changed files with 96 additions and 93 deletions

View file

@ -4,7 +4,7 @@
package draw2dbase package draw2dbase
import ( import (
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
) )
// Liner receive segment definition // Liner receive segment definition

View file

@ -8,9 +8,9 @@ import (
"image" "image"
"image/color" "image/color"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/golang/freetype/truetype" "git.fromouter.space/crunchy-rocks/freetype/truetype"
) )
var DefaultFontData = draw2d.FontData{Name: "luxi", Family: draw2d.FontFamilySans, Style: draw2d.FontStyleNormal} var DefaultFontData = draw2d.FontData{Name: "luxi", Family: draw2d.FontFamilySans, Style: draw2d.FontStyleNormal}
@ -47,7 +47,6 @@ func (cs *ContextStack) GetFontName() string {
return fmt.Sprintf("%s:%d:%d:%9.2f", fontData.Name, fontData.Family, fontData.Style, cs.FontSize) return fmt.Sprintf("%s:%d:%d:%9.2f", fontData.Name, fontData.Family, fontData.Style, cs.FontSize)
} }
/** /**
* Create a new Graphic context from an image * Create a new Graphic context from an image
*/ */

View file

@ -6,7 +6,7 @@ package draw2dbase
import ( import (
"math" "math"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
) )
type LineStroker struct { type LineStroker struct {

View file

@ -1,6 +1,6 @@
package draw2dbase package draw2dbase
import "github.com/llgcode/draw2d" import "git.fromouter.space/crunchy-rocks/draw2d"
// GlyphCache manage a cache of glyphs // GlyphCache manage a cache of glyphs
type GlyphCache interface { type GlyphCache interface {
@ -13,11 +13,10 @@ type GlyphCacheImp struct {
glyphs map[string]map[rune]*Glyph glyphs map[string]map[rune]*Glyph
} }
// NewGlyphCache initializes a GlyphCache // NewGlyphCache initializes a GlyphCache
func NewGlyphCache() *GlyphCacheImp { func NewGlyphCache() *GlyphCacheImp {
glyphs := make(map[string]map[rune]*Glyph) glyphs := make(map[string]map[rune]*Glyph)
return &GlyphCacheImp { return &GlyphCacheImp{
glyphs: glyphs, glyphs: glyphs,
} }
} }

View file

@ -8,12 +8,12 @@ import (
"math" "math"
"runtime" "runtime"
"git.fromouter.space/crunchy-rocks/draw2d"
"git.fromouter.space/crunchy-rocks/draw2d/draw2dbase"
"git.fromouter.space/crunchy-rocks/draw2d/draw2dimg"
"github.com/go-gl/gl/v2.1/gl" "github.com/go-gl/gl/v2.1/gl"
"github.com/golang/freetype/raster" "github.com/golang/freetype/raster"
"github.com/golang/freetype/truetype" "github.com/golang/freetype/truetype"
"github.com/llgcode/draw2d"
"github.com/llgcode/draw2d/draw2dbase"
"github.com/llgcode/draw2d/draw2dimg"
"golang.org/x/image/font" "golang.org/x/image/font"
"golang.org/x/image/math/fixed" "golang.org/x/image/math/fixed"

View file

@ -1,8 +1,8 @@
package draw2dgl package draw2dgl
import ( import (
"github.com/golang/freetype/truetype" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/freetype/truetype"
"golang.org/x/image/math/fixed" "golang.org/x/image/math/fixed"
) )

View file

@ -2,13 +2,14 @@ package draw2dimg
import ( import (
"fmt" "fmt"
"github.com/golang/freetype/truetype"
"github.com/llgcode/draw2d"
"github.com/llgcode/draw2d/draw2dkit"
"golang.org/x/image/font/gofont/goregular"
"image" "image"
"image/color" "image/color"
"testing" "testing"
"git.fromouter.space/crunchy-rocks/draw2d"
"git.fromouter.space/crunchy-rocks/draw2d/draw2dkit"
"git.fromouter.space/crunchy-rocks/freetype/truetype"
"golang.org/x/image/font/gofont/goregular"
) )
// font generated from icomoon.io and converted to go byte slice // font generated from icomoon.io and converted to go byte slice

View file

@ -9,11 +9,12 @@ import (
"log" "log"
"math" "math"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/draw2dbase" "git.fromouter.space/crunchy-rocks/draw2d/draw2dbase"
"git.fromouter.space/crunchy-rocks/emoji"
"github.com/golang/freetype/raster" "git.fromouter.space/crunchy-rocks/freetype/raster"
"github.com/golang/freetype/truetype" "git.fromouter.space/crunchy-rocks/freetype/truetype"
"golang.org/x/image/draw" "golang.org/x/image/draw"
"golang.org/x/image/font" "golang.org/x/image/font"
@ -54,7 +55,6 @@ const (
// NewGraphicContext creates a new Graphic context from an image. // NewGraphicContext creates a new Graphic context from an image.
func NewGraphicContext(img draw.Image) *GraphicContext { func NewGraphicContext(img draw.Image) *GraphicContext {
var painter Painter var painter Painter
switch selectImage := img.(type) { switch selectImage := img.(type) {
case *image.RGBA: case *image.RGBA:

View file

@ -4,7 +4,7 @@
package draw2dimg package draw2dimg
import ( import (
"github.com/golang/freetype/raster" "git.fromouter.space/crunchy-rocks/freetype/raster"
"golang.org/x/image/math/fixed" "golang.org/x/image/math/fixed"
) )

View file

@ -1,8 +1,8 @@
package draw2dimg package draw2dimg
import ( import (
"github.com/golang/freetype/truetype" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/freetype/truetype"
"golang.org/x/image/math/fixed" "golang.org/x/image/math/fixed"
) )

View file

@ -14,7 +14,7 @@ import (
"os" "os"
"strconv" "strconv"
"github.com/golang/freetype/truetype" "git.fromouter.space/crunchy-rocks/freetype/truetype"
"github.com/jung-kurt/gofpdf" "github.com/jung-kurt/gofpdf"
"github.com/llgcode/draw2d" "github.com/llgcode/draw2d"

View file

@ -7,13 +7,14 @@ import (
"bytes" "bytes"
"encoding/base64" "encoding/base64"
"fmt" "fmt"
"github.com/llgcode/draw2d"
"image" "image"
"image/color" "image/color"
"image/png" "image/png"
"math" "math"
"strconv" "strconv"
"strings" "strings"
"git.fromouter.space/crunchy-rocks/draw2d"
) )
func toSvgRGBA(c color.Color) string { func toSvgRGBA(c color.Color) string {

View file

@ -4,16 +4,17 @@
package draw2dsvg package draw2dsvg
import ( import (
"github.com/golang/freetype/truetype"
"github.com/llgcode/draw2d"
"github.com/llgcode/draw2d/draw2dbase"
"golang.org/x/image/font"
"golang.org/x/image/math/fixed"
"image" "image"
"log" "log"
"math" "math"
"strconv" "strconv"
"strings" "strings"
"git.fromouter.space/crunchy-rocks/draw2d"
"git.fromouter.space/crunchy-rocks/draw2d/draw2dbase"
"git.fromouter.space/crunchy-rocks/freetype/truetype"
"golang.org/x/image/font"
"golang.org/x/image/math/fixed"
) )
type drawType int type drawType int

View file

@ -7,16 +7,16 @@ package draw2dsvg_test
import ( import (
"testing" "testing"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/samples/android" "git.fromouter.space/crunchy-rocks/draw2d/samples/android"
"github.com/llgcode/draw2d/samples/frameimage" "git.fromouter.space/crunchy-rocks/draw2d/samples/frameimage"
"github.com/llgcode/draw2d/samples/geometry" "git.fromouter.space/crunchy-rocks/draw2d/samples/geometry"
"github.com/llgcode/draw2d/samples/gopher" "git.fromouter.space/crunchy-rocks/draw2d/samples/gopher"
"github.com/llgcode/draw2d/samples/gopher2" "git.fromouter.space/crunchy-rocks/draw2d/samples/gopher2"
"github.com/llgcode/draw2d/samples/helloworld" "git.fromouter.space/crunchy-rocks/draw2d/samples/helloworld"
"github.com/llgcode/draw2d/samples/line" "git.fromouter.space/crunchy-rocks/draw2d/samples/line"
"github.com/llgcode/draw2d/samples/linecapjoin" "git.fromouter.space/crunchy-rocks/draw2d/samples/linecapjoin"
"github.com/llgcode/draw2d/samples/postscript" "git.fromouter.space/crunchy-rocks/draw2d/samples/postscript"
) )
func TestSampleAndroid(t *testing.T) { func TestSampleAndroid(t *testing.T) {

View file

@ -9,8 +9,8 @@ package draw2dsvg_test
import ( import (
"testing" "testing"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/draw2dsvg" "git.fromouter.space/crunchy-rocks/draw2d/draw2dsvg"
) )
type sample func(gc draw2d.GraphicContext, ext string) (string, error) type sample func(gc draw2d.GraphicContext, ext string) (string, error)

View file

@ -2,8 +2,8 @@
package draw2dsvg package draw2dsvg
import ( import (
"github.com/golang/freetype/truetype" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/freetype/truetype"
"golang.org/x/image/math/fixed" "golang.org/x/image/math/fixed"
) )

View file

@ -8,8 +8,9 @@ import (
"log" "log"
"path/filepath" "path/filepath"
"github.com/golang/freetype/truetype"
"sync" "sync"
"git.fromouter.space/crunchy-rocks/freetype/truetype"
) )
// FontStyle defines bold and italic styles for the font // FontStyle defines bold and italic styles for the font

View file

@ -8,9 +8,9 @@ import (
"image/color" "image/color"
"math" "math"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/draw2dkit" "git.fromouter.space/crunchy-rocks/draw2d/draw2dkit"
"github.com/llgcode/draw2d/samples" "git.fromouter.space/crunchy-rocks/draw2d/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

View file

@ -9,9 +9,9 @@ import (
"image/png" "image/png"
"net/http" "net/http"
"github.com/llgcode/draw2d/draw2dimg" "git.fromouter.space/crunchy-rocks/draw2d/draw2dimg"
"github.com/llgcode/draw2d/draw2dpdf" "git.fromouter.space/crunchy-rocks/draw2d/draw2dpdf"
"github.com/llgcode/draw2d/samples/android" "git.fromouter.space/crunchy-rocks/draw2d/samples/android"
"appengine" "appengine"
) )

View file

@ -7,10 +7,10 @@ package frameimage
import ( import (
"math" "math"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/draw2dimg" "git.fromouter.space/crunchy-rocks/draw2d/draw2dimg"
"github.com/llgcode/draw2d/draw2dkit" "git.fromouter.space/crunchy-rocks/draw2d/draw2dkit"
"github.com/llgcode/draw2d/samples" "git.fromouter.space/crunchy-rocks/draw2d/samples"
) )
// Main draws the image frame and returns the filename. // Main draws the image frame and returns the filename.

View file

@ -9,10 +9,10 @@ import (
"image/color" "image/color"
"math" "math"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/draw2dkit" "git.fromouter.space/crunchy-rocks/draw2d/draw2dkit"
"github.com/llgcode/draw2d/samples" "git.fromouter.space/crunchy-rocks/draw2d/samples"
"github.com/llgcode/draw2d/samples/gopher2" "git.fromouter.space/crunchy-rocks/draw2d/samples/gopher2"
) )
// Main draws geometry and returns the filename. This should only be // Main draws geometry and returns the filename. This should only be

View file

@ -8,8 +8,8 @@ package gopher
import ( import (
"image/color" "image/color"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/samples" "git.fromouter.space/crunchy-rocks/draw2d/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

View file

@ -10,9 +10,9 @@ import (
"image/color" "image/color"
"math" "math"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/draw2dkit" "git.fromouter.space/crunchy-rocks/draw2d/draw2dkit"
"github.com/llgcode/draw2d/samples" "git.fromouter.space/crunchy-rocks/draw2d/samples"
) )
// Main draws a rotated face of the gopher. Afterwards it returns // Main draws a rotated face of the gopher. Afterwards it returns

View file

@ -9,9 +9,9 @@ import (
"fmt" "fmt"
"image" "image"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/draw2dkit" "git.fromouter.space/crunchy-rocks/draw2d/draw2dkit"
"github.com/llgcode/draw2d/samples" "git.fromouter.space/crunchy-rocks/draw2d/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

View file

@ -6,11 +6,11 @@ import (
"log" "log"
"runtime" "runtime"
"git.fromouter.space/crunchy-rocks/draw2d"
"git.fromouter.space/crunchy-rocks/draw2d/draw2dgl"
"git.fromouter.space/crunchy-rocks/draw2d/draw2dkit"
"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"
"github.com/llgcode/draw2d/draw2dgl"
"github.com/llgcode/draw2d/draw2dkit"
) )
var ( var (

View file

@ -7,9 +7,9 @@ package line
import ( import (
"image/color" "image/color"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/draw2dkit" "git.fromouter.space/crunchy-rocks/draw2d/draw2dkit"
"github.com/llgcode/draw2d/samples" "git.fromouter.space/crunchy-rocks/draw2d/samples"
) )
// Main draws vertically spaced lines and returns the filename. // Main draws vertically spaced lines and returns the filename.

View file

@ -7,8 +7,8 @@ package linecapjoin
import ( import (
"image/color" "image/color"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/samples" "git.fromouter.space/crunchy-rocks/draw2d/samples"
) )
// Main draws the different line caps and joins. // Main draws the different line caps and joins.

View file

@ -8,8 +8,8 @@ import (
"github.com/llgcode/ps" "github.com/llgcode/ps"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/samples" "git.fromouter.space/crunchy-rocks/draw2d/samples"
) )
// Main draws the tiger // Main draws the tiger

View file

@ -10,9 +10,9 @@ import (
"strings" "strings"
"time" "time"
"git.fromouter.space/crunchy-rocks/draw2d/draw2dgl"
"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"
"github.com/llgcode/ps" "github.com/llgcode/ps"
) )

View file

@ -5,16 +5,16 @@ package draw2d_test
import ( import (
"testing" "testing"
"github.com/llgcode/draw2d" "git.fromouter.space/crunchy-rocks/draw2d"
"github.com/llgcode/draw2d/samples/android" "git.fromouter.space/crunchy-rocks/draw2d/samples/android"
"github.com/llgcode/draw2d/samples/frameimage" "git.fromouter.space/crunchy-rocks/draw2d/samples/frameimage"
"github.com/llgcode/draw2d/samples/geometry" "git.fromouter.space/crunchy-rocks/draw2d/samples/geometry"
"github.com/llgcode/draw2d/samples/gopher" "git.fromouter.space/crunchy-rocks/draw2d/samples/gopher"
"github.com/llgcode/draw2d/samples/gopher2" "git.fromouter.space/crunchy-rocks/draw2d/samples/gopher2"
"github.com/llgcode/draw2d/samples/helloworld" "git.fromouter.space/crunchy-rocks/draw2d/samples/helloworld"
"github.com/llgcode/draw2d/samples/line" "git.fromouter.space/crunchy-rocks/draw2d/samples/line"
"github.com/llgcode/draw2d/samples/linecapjoin" "git.fromouter.space/crunchy-rocks/draw2d/samples/linecapjoin"
"github.com/llgcode/draw2d/samples/postscript" "git.fromouter.space/crunchy-rocks/draw2d/samples/postscript"
) )
func TestSampleAndroid(t *testing.T) { func TestSampleAndroid(t *testing.T) {

View file

@ -4,11 +4,12 @@ package draw2d_test
import ( import (
"fmt" "fmt"
"github.com/llgcode/draw2d"
"github.com/llgcode/draw2d/draw2dimg"
"github.com/llgcode/draw2d/draw2dkit"
"image" "image"
"testing" "testing"
"git.fromouter.space/crunchy-rocks/draw2d"
"git.fromouter.space/crunchy-rocks/draw2d/draw2dimg"
"git.fromouter.space/crunchy-rocks/draw2d/draw2dkit"
) )
func TestSync(t *testing.T) { func TestSync(t *testing.T) {