all: gofmt+goimports
This commit is contained in:
parent
7e968a713e
commit
f78ac58522
40 changed files with 923 additions and 913 deletions
|
@ -18,8 +18,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/llgcode/draw2d/draw2dgl"
|
||||
"github.com/llgcode/draw2d/postscript"
|
||||
"gl"
|
||||
"glut"
|
||||
"io/ioutil"
|
||||
|
@ -28,6 +26,9 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2dgl"
|
||||
"github.com/llgcode/draw2d/postscript"
|
||||
)
|
||||
|
||||
var postscriptContent string
|
||||
|
|
|
@ -6,12 +6,12 @@ package main
|
|||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/png"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"image"
|
||||
"image/png"
|
||||
)
|
||||
|
||||
func saveToPngFile(filePath string, m image.Image) {
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"exp/gui"
|
||||
"exp/gui/x11"
|
||||
"fmt"
|
||||
"image"
|
||||
"math"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -3,14 +3,14 @@ package main
|
|||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"image"
|
||||
"image/color"
|
||||
"image/png"
|
||||
"log"
|
||||
"math"
|
||||
"os"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -6,14 +6,14 @@ package main
|
|||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"image"
|
||||
"image/color"
|
||||
"image/png"
|
||||
"log"
|
||||
"math"
|
||||
"os"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -3,14 +3,14 @@ package main
|
|||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/color"
|
||||
"image/png"
|
||||
"log"
|
||||
"math"
|
||||
"os"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"image"
|
||||
"image/color"
|
||||
"image/png"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -2,7 +2,6 @@ package main
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/draw"
|
||||
|
@ -10,6 +9,8 @@ import (
|
|||
"log"
|
||||
"math"
|
||||
"os"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
)
|
||||
|
||||
func saveToPngFile(filePath string, m image.Image) {
|
||||
|
|
|
@ -2,8 +2,6 @@ package main
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"github.com/llgcode/draw2d/postscript"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/png"
|
||||
|
@ -11,6 +9,9 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"github.com/llgcode/draw2d/postscript"
|
||||
)
|
||||
|
||||
func saveToPngFile(filePath string, m image.Image) {
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
package draw2d
|
||||
|
||||
import (
|
||||
"code.google.com/p/freetype-go/freetype/raster"
|
||||
"math"
|
||||
|
||||
"code.google.com/p/freetype-go/freetype/raster"
|
||||
)
|
||||
|
||||
func arc(t VertexConverter, x, y, rx, ry, start, angle, scale float64) (lastX, lastY float64) {
|
||||
|
|
|
@ -24,7 +24,7 @@ func SegmentArc(t LineTracer, x, y, rx, ry, start, angle, scale float64) {
|
|||
if (angle < end-da/4) != clockWise {
|
||||
curX = x + math.Cos(end)*rx
|
||||
curY = y + math.Sin(end)*ry
|
||||
break;
|
||||
break
|
||||
}
|
||||
curX = x + math.Cos(angle)*rx
|
||||
curY = y + math.Sin(angle)*ry
|
||||
|
|
|
@ -2,7 +2,6 @@ package curve
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"github.com/llgcode/draw2d/draw2d/raster"
|
||||
"fmt"
|
||||
"image"
|
||||
"image/color"
|
||||
|
@ -11,6 +10,8 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d/raster"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -4,10 +4,11 @@
|
|||
package draw2d
|
||||
|
||||
import (
|
||||
"code.google.com/p/freetype-go/freetype/truetype"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"path"
|
||||
|
||||
"code.google.com/p/freetype-go/freetype/truetype"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -4,14 +4,15 @@
|
|||
package draw2d
|
||||
|
||||
import (
|
||||
"code.google.com/p/freetype-go/freetype/raster"
|
||||
"code.google.com/p/freetype-go/freetype/truetype"
|
||||
"errors"
|
||||
"image"
|
||||
"image/color"
|
||||
"image/draw"
|
||||
"log"
|
||||
"math"
|
||||
|
||||
"code.google.com/p/freetype-go/freetype/raster"
|
||||
"code.google.com/p/freetype-go/freetype/truetype"
|
||||
)
|
||||
|
||||
type Painter interface {
|
||||
|
|
|
@ -2,14 +2,15 @@ package raster
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"github.com/llgcode/draw2d/draw2d/curve"
|
||||
"code.google.com/p/freetype-go/freetype/raster"
|
||||
"image"
|
||||
"image/color"
|
||||
"image/png"
|
||||
"log"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"code.google.com/p/freetype-go/freetype/raster"
|
||||
"github.com/llgcode/draw2d/draw2d/curve"
|
||||
)
|
||||
|
||||
var flattening_threshold float64 = 0.5
|
||||
|
|
|
@ -4,9 +4,10 @@
|
|||
package draw2d
|
||||
|
||||
import (
|
||||
"code.google.com/p/freetype-go/freetype/truetype"
|
||||
"image"
|
||||
"image/color"
|
||||
|
||||
"code.google.com/p/freetype-go/freetype/truetype"
|
||||
)
|
||||
|
||||
type StackGraphicContext struct {
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
package draw2d
|
||||
|
||||
import (
|
||||
"code.google.com/p/freetype-go/freetype/raster"
|
||||
"math"
|
||||
|
||||
"code.google.com/p/freetype-go/freetype/raster"
|
||||
)
|
||||
|
||||
type MatrixTransform [6]float64
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package draw2dgl
|
||||
|
||||
import (
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"code.google.com/p/freetype-go/freetype/raster"
|
||||
"gl"
|
||||
"image"
|
||||
"image/color"
|
||||
"image/draw"
|
||||
|
||||
"code.google.com/p/freetype-go/freetype/raster"
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
//"log"
|
||||
)
|
||||
|
||||
|
|
|
@ -3,14 +3,14 @@ package main
|
|||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"image"
|
||||
"image/draw"
|
||||
"image/png"
|
||||
"log"
|
||||
"math"
|
||||
"os"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
)
|
||||
|
||||
func saveToPngFile(filePath string, m image.Image) {
|
||||
|
|
|
@ -4,11 +4,12 @@
|
|||
package postscript
|
||||
|
||||
import (
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
)
|
||||
|
||||
type Interpreter struct {
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
package postscript
|
||||
|
||||
import ()
|
||||
|
||||
//int array array -> Create array of length int
|
||||
func array(interpreter *Interpreter) {
|
||||
interpreter.Push(make([]Value, interpreter.PopInt()))
|
||||
|
|
|
@ -5,10 +5,11 @@
|
|||
package postscript
|
||||
|
||||
import (
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"image/color"
|
||||
"log"
|
||||
"math"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
)
|
||||
|
||||
//Path Construction Operators
|
||||
|
|
|
@ -4,10 +4,6 @@
|
|||
// Miscellaneous Operators
|
||||
package postscript
|
||||
|
||||
import (
|
||||
//"log"
|
||||
)
|
||||
|
||||
//proc bind proc Replace operator names in proc with operators; perform idiom recognition
|
||||
func bind(interpreter *Interpreter) {
|
||||
pdef := interpreter.PopProcedureDefinition()
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"os"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
. "github.com/llgcode/draw2d/wingui"
|
||||
)
|
||||
|
||||
|
|
|
@ -5,18 +5,19 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"github.com/llgcode/draw2d/wingui"
|
||||
"github.com/llgcode/draw2d/postscript"
|
||||
"fmt"
|
||||
"image"
|
||||
"io/ioutil"
|
||||
"image/color"
|
||||
"strings"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"github.com/llgcode/draw2d/draw2d"
|
||||
"github.com/llgcode/draw2d/postscript"
|
||||
"github.com/llgcode/draw2d/wingui"
|
||||
)
|
||||
|
||||
// some help functions
|
||||
|
|
Loading…
Reference in a new issue