diff --git a/Makefile b/Makefile index 44f95a8..c9eefc3 100644 --- a/Makefile +++ b/Makefile @@ -4,23 +4,23 @@ all: install install: - cd draw2d && make install + cd draw2d && go install # cd draw2dgl && make install - cd postscript && make install + cd postscript && go install # cd wingui && make install -clean: - cd draw2d && make clean -# cd draw2dgl && make clean - cd postscript && make clean - cd cmd && make clean -# cd wingui && make clean +build: + cd draw2d && go build +# cd draw2dgl && make build + cd postscript && go build +# cd wingui && make build -nuke: - cd draw2d && make nuke -# cd draw2dgl && make nuke - cd postscript && make nuke -# cd wingui && make nuke +clean: + cd draw2d && go clean +# cd draw2dgl && make clean + cd postscript && go clean + cd cmd && go clean +# cd wingui && make clean command: cd cmd && make diff --git a/cmd/testandroid.go b/cmd/testandroid.go index 25fbb80..36209c6 100644 --- a/cmd/testandroid.go +++ b/cmd/testandroid.go @@ -5,7 +5,6 @@ import ( "fmt" "log" "os" - "time" "code.google.com/p/draw2d/draw2d" "image" @@ -26,7 +25,6 @@ var ( func initGc(w, h int) (image.Image, draw2d.GraphicContext) { i := image.NewRGBA(image.Rect(0, 0, w, h)) gc := draw2d.NewGraphicContext(i) - lastTime = time.Now() gc.SetStrokeColor(image.Black) gc.SetFillColor(image.White) @@ -37,8 +35,6 @@ func initGc(w, h int) (image.Image, draw2d.GraphicContext) { } func saveToPngFile(TestName string, m image.Image) { - dt := time.Now().Sub(lastTime) - fmt.Printf("%s during: %f ms\n", TestName, float64(dt)*1e-6) filePath := folder + TestName + ".png" f, err := os.Create(filePath) if err != nil { diff --git a/cmd/testdraw2d.go b/cmd/testdraw2d.go index 1b0c0d4..09ffe4e 100644 --- a/cmd/testdraw2d.go +++ b/cmd/testdraw2d.go @@ -8,7 +8,6 @@ import ( "fmt" "log" "os" - "time" "code.google.com/p/draw2d/draw2d" "image" @@ -29,7 +28,6 @@ var ( func initGc(w, h int) (image.Image, draw2d.GraphicContext) { i := image.NewRGBA(image.Rect(0, 0, w, h)) gc := draw2d.NewGraphicContext(i) - lastTime = time.Now() gc.SetStrokeColor(image.Black) gc.SetFillColor(image.White) @@ -40,9 +38,6 @@ func initGc(w, h int) (image.Image, draw2d.GraphicContext) { } func saveToPngFile(TestName string, m image.Image) { - t := time.Now() - dt := t.Sub(lastTime) - fmt.Printf("%s during: %f ms\n", TestName, float64(dt)*1e-6) filePath := folder + TestName + ".png" f, err := os.Create(filePath) if err != nil { @@ -61,8 +56,7 @@ func saveToPngFile(TestName string, m image.Image) { log.Println(err) os.Exit(1) } - dt = time.Now().Sub(t) - fmt.Printf("Wrote %s OK in %f ms.\n", filePath, float64(dt)*1e-6) + fmt.Printf("Wrote %s OK.\n", filePath) } /* @@ -513,7 +507,6 @@ func TestBigPicture() { } func main() { - t := time.Now() TestPath() TestDrawArc() TestDrawArcNegative() @@ -532,6 +525,4 @@ func main() { TestPathTransform() TestFillString() TestBigPicture() - dt := time.Now().Sub(t) - fmt.Printf("All tests during: %f ms\n", float64(dt)*1e-6) } diff --git a/cmd/testgopher.go b/cmd/testgopher.go index 0d9c1fd..40907aa 100644 --- a/cmd/testgopher.go +++ b/cmd/testgopher.go @@ -6,7 +6,6 @@ import ( "log" "math" "os" - "time" "code.google.com/p/draw2d/draw2d" "image" @@ -26,7 +25,6 @@ var ( func initGc(w, h int) (image.Image, draw2d.GraphicContext) { i := image.NewRGBA(image.Rect(0, 0, w, h)) gc := draw2d.NewGraphicContext(i) - lastTime = time.Now() gc.SetStrokeColor(image.Black) gc.SetFillColor(image.White) @@ -37,8 +35,6 @@ func initGc(w, h int) (image.Image, draw2d.GraphicContext) { } func saveToPngFile(TestName string, m image.Image) { - dt := time.Now().Sub(lastTime) - fmt.Printf("%s during: %f ms\n", TestName, float64(dt)*1e-6) filePath := folder + TestName + ".png" f, err := os.Create(filePath) if err != nil { diff --git a/cmd/testimage.go b/cmd/testimage.go index 3dd8b1f..f936cdf 100644 --- a/cmd/testimage.go +++ b/cmd/testimage.go @@ -10,7 +10,6 @@ import ( "log" "math" "os" - "time" ) func saveToPngFile(filePath string, m image.Image) { @@ -37,7 +36,7 @@ func saveToPngFile(filePath string, m image.Image) { func loadFromPngFile(filePath string) image.Image { f, err := os.OpenFile(filePath, 0, 0) if f == nil { - log.Printf("can't open file; err=%s\n", err.String()) + log.Printf("can't open file; err=%s\n", err) return nil } defer f.Close() @@ -61,9 +60,6 @@ func main() { //tr.Scale(3, 3) tr.Translate(-width/2, -height/2) tr.Translate(200, 5) - lastTime := time.Now() draw2d.DrawImage(source, dest, tr, draw.Over, draw2d.BilinearFilter) - dt := time.Now().Sub(lastTime) - fmt.Printf("Draw image: %f ms\n", float64(dt)*1e-6) saveToPngFile("../resource/result/TestDrawImage.png", dest) } diff --git a/cmd/testpostscript.go b/cmd/testpostscript.go index 735843c..8b5809f 100644 --- a/cmd/testpostscript.go +++ b/cmd/testpostscript.go @@ -11,7 +11,6 @@ import ( "log" "os" "strings" - "time" ) func saveToPngFile(filePath string, m image.Image) { @@ -49,9 +48,6 @@ func main() { bytes, err := ioutil.ReadAll(src) reader := strings.NewReader(string(bytes)) interpreter := postscript.NewInterpreter(gc) - lastTime := time.Now() interpreter.Execute(reader) - dt := time.Now().Sub(lastTime) - fmt.Printf("Draw image: %f ms\n", float64(dt)*1e-6) saveToPngFile("../resource/result/TestPostscript.png", i) } diff --git a/draw2d/advanced_path.go b/draw2d/advanced_path.go index 1b05483..5cce444 100644 --- a/draw2d/advanced_path.go +++ b/draw2d/advanced_path.go @@ -6,10 +6,8 @@ import ( "math" ) - //high level path creation - func Rect(path Path, x1, y1, x2, y2 float64) { path.MoveTo(x1, y1) path.LineTo(x2, y1) diff --git a/draw2d/draw2d.go b/draw2d/draw2d.go index d5ed4b7..2ced50c 100644 --- a/draw2d/draw2d.go +++ b/draw2d/draw2d.go @@ -1,3 +1,2 @@ // The package draw2d provide a Graphic Context that can draw vectorial figure on surface. package draw2d - diff --git a/draw2d/paint.go b/draw2d/paint.go index f019b92..f2f8fc1 100644 --- a/draw2d/paint.go +++ b/draw2d/paint.go @@ -1,6 +1,7 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff package draw2d + /* import ( "image/draw" @@ -9,6 +10,7 @@ import ( )*/ const M = 1<<16 - 1 + /* type NRGBAPainter struct { // The image to compose onto. @@ -74,7 +76,7 @@ func (r *NRGBAPainter) Paint(ss []raster.Span, done bool) { } } } - + } // SetColor sets the color to paint the spans. @@ -86,4 +88,4 @@ func (r *NRGBAPainter) SetColor(c image.Color) { func NewNRGBAPainter(m *image.NRGBA) *NRGBAPainter { return &NRGBAPainter{Image: m} } -*/ \ No newline at end of file +*/ diff --git a/draw2d/path_converter.go b/draw2d/path_converter.go index eafc150..9f6a763 100644 --- a/draw2d/path_converter.go +++ b/draw2d/path_converter.go @@ -26,7 +26,6 @@ func (c *PathConverter) Convert(paths ...*PathStorage) { } } - func (c *PathConverter) ConvertCommand(cmd PathCmd, vertices ...float64) int { switch cmd { case MoveTo: diff --git a/draw2d/raster/polygon.go b/draw2d/raster/polygon.go index 0253d58..1cb43ed 100644 --- a/draw2d/raster/polygon.go +++ b/draw2d/raster/polygon.go @@ -12,7 +12,6 @@ const ( type Polygon []float64 - type PolygonEdge struct { X, Slope float64 FirstLine, LastLine int @@ -166,7 +165,6 @@ func (p Polygon) getEdges(startIndex, vertexCount int, edges []PolygonEdge, tr [ return edgeCount } - //! Creates a polygon edge between two vectors. /*! Clips the edge vertically to the clip rectangle. Returns true for edges that * should be rendered, false for others. @@ -228,7 +226,6 @@ func getEdge(x0, y0, x1, y1 float64, edge *PolygonEdge, clipBound [4]float64) bo return true } - //! Creates a vertical polygon edge between two y values. /*! Clips the edge vertically to the clip rectangle. Returns true for edges that * should be rendered, false for others. @@ -277,12 +274,12 @@ func getVerticalEdge(startY, endY, x float64, edge *PolygonEdge, clipBound [4]fl return true } - type VertexData struct { X, Y float64 ClipFlags int Line int } + //! Calculates the edges of the polygon with transformation and clipping to edges array. /*! Note that this may return upto three times the amount of edges that the polygon has vertices, * in the unlucky case where both left and right side get clipped for all edges. diff --git a/draw2d/stroker.go b/draw2d/stroker.go index cdd36d2..88a0bb8 100644 --- a/draw2d/stroker.go +++ b/draw2d/stroker.go @@ -18,7 +18,6 @@ const ( MiterJoin ) - type LineStroker struct { Next VertexConverter HalfLineWidth float64 @@ -42,7 +41,6 @@ func NewLineStroker(c Cap, j Join, converter VertexConverter) *LineStroker { return l } - func (l *LineStroker) NextCommand(command VertexCommand) { l.command = command if command == VertexStopCommand { @@ -107,7 +105,6 @@ func (l *LineStroker) closePolygon() { } } - func (l *LineStroker) line(x1, y1, x2, y2 float64) { dx := (x2 - x1) dy := (y2 - y1) diff --git a/postscript/operators.go b/postscript/operators.go index 6cc0525..b75df45 100644 --- a/postscript/operators.go +++ b/postscript/operators.go @@ -17,7 +17,6 @@ func (o *PrimitiveOperator) Execute(interpreter *Interpreter) { o.f(interpreter) } - func save(interpreter *Interpreter) { interpreter.Push("VM Snapshot") } @@ -26,7 +25,6 @@ func restore(interpreter *Interpreter) { interpreter.Pop() } - func initSystemOperators(interpreter *Interpreter) { interpreter.SystemDefine("save", NewOperator(save)) interpreter.SystemDefine("restore", NewOperator(restore)) diff --git a/postscript/operators_array.go b/postscript/operators_array.go index 95cb477..9d4c2a8 100644 --- a/postscript/operators_array.go +++ b/postscript/operators_array.go @@ -3,22 +3,25 @@ package postscript - import () + //int array array -> Create array of length int func array(interpreter *Interpreter) { interpreter.Push(make([]Value, interpreter.PopInt())) } + //array length int -> Return number of elements in array func lengtharray(interpreter *Interpreter) { interpreter.Push(float64(len(interpreter.Pop().([]Value)))) } + //array index get any -> Return array element indexed by index func getarray(interpreter *Interpreter) { index := interpreter.PopInt() array := interpreter.Pop().([]Value) interpreter.Push(array[index]) } + //array index any put – -> Put any into array at index func putarray(interpreter *Interpreter) { value := interpreter.Pop() @@ -26,6 +29,7 @@ func putarray(interpreter *Interpreter) { array := interpreter.Pop().([]Value) array[index] = value } + //array index count getinterval subarray -> Return subarray of array starting at index for count elements func getinterval(interpreter *Interpreter) { count := interpreter.PopInt() @@ -35,6 +39,7 @@ func getinterval(interpreter *Interpreter) { copy(subarray, array[index:index+count]) interpreter.Push(subarray) } + //array1 index array2 putinterval – Replace subarray of array1 starting at index by array2|packedarray2 func putinterval(interpreter *Interpreter) { array2 := interpreter.Pop().([]Value) @@ -44,6 +49,7 @@ func putinterval(interpreter *Interpreter) { array1[i+index] = v } } + // any0 … anyn−1 array astore array // stores the objects any0 to anyn−1 from the operand stack into array, where n is the length of array func astore(interpreter *Interpreter) { @@ -53,6 +59,7 @@ func astore(interpreter *Interpreter) { array[i] = interpreter.Pop() } } + //array aload any0 … any-1 array //Push all elements of array on stack func aload(interpreter *Interpreter) { @@ -62,6 +69,7 @@ func aload(interpreter *Interpreter) { } interpreter.Push(array) } + //array proc forall – Execute proc for each element of array func forallarray(interpreter *Interpreter) { proc := NewProcedure(interpreter.PopProcedureDefinition()) diff --git a/postscript/operators_control.go b/postscript/operators_control.go index 131ef44..8a42d5a 100644 --- a/postscript/operators_control.go +++ b/postscript/operators_control.go @@ -6,6 +6,7 @@ package postscript import ( "log" ) + // any exec – Execute arbitrary object func exec(interpreter *Interpreter) { value := interpreter.Pop() @@ -69,7 +70,6 @@ func stopped(interpreter *Interpreter) { interpreter.Push(false) } - func initControlOperators(interpreter *Interpreter) { interpreter.SystemDefine("exec", NewOperator(exec)) interpreter.SystemDefine("if", NewOperator(ifoperator)) diff --git a/postscript/operators_dictionary.go b/postscript/operators_dictionary.go index d23cf66..88732c4 100644 --- a/postscript/operators_dictionary.go +++ b/postscript/operators_dictionary.go @@ -3,32 +3,37 @@ package postscript - import ( "log" ) + //int dict dict -> Create dictionary with capacity for int elements func dict(interpreter *Interpreter) { interpreter.Push(NewDictionary(interpreter.PopInt())) } + //dict length int -> Return number of entries in dict func lengthdict(interpreter *Interpreter) { dictionary := interpreter.Pop().(Dictionary) interpreter.Push(float64(len(dictionary))) } + //dict maxlength int -> Return current capacity of dict func maxlength(interpreter *Interpreter) { interpreter.Pop() interpreter.Push(float64(999999999)) // push arbitrary value } + //dict begin – -> Push dict on dictionary stack func begin(interpreter *Interpreter) { interpreter.PushDictionary(interpreter.Pop().(Dictionary)) } + //– end – -> Pop current dictionary off dictionary stack func end(interpreter *Interpreter) { interpreter.PopDictionary() } + //key value def – -> Associate key and value in current dictionary func def(interpreter *Interpreter) { value := interpreter.Pop() @@ -38,6 +43,7 @@ func def(interpreter *Interpreter) { } interpreter.Define(name, value) } + //key load value -> Search dictionary stack for key and return associated value func load(interpreter *Interpreter) { name := interpreter.PopName() @@ -47,6 +53,7 @@ func load(interpreter *Interpreter) { } interpreter.Push(value) } + //key value store – -> Replace topmost definition of key func store(interpreter *Interpreter) { value := interpreter.Pop() @@ -56,12 +63,14 @@ func store(interpreter *Interpreter) { dictionary[key] = value } } + //dict key get any -> Return value associated with key in dict func getdict(interpreter *Interpreter) { key := interpreter.PopName() dictionary := interpreter.Pop().(Dictionary) interpreter.Push(dictionary[key]) } + //dict key value put – -> Associate key with value in dict func putdict(interpreter *Interpreter) { value := interpreter.Pop() @@ -69,18 +78,21 @@ func putdict(interpreter *Interpreter) { dictionary := interpreter.Pop().(Dictionary) dictionary[key] = value } + //dict key undef – Remove key and its value from dict func undef(interpreter *Interpreter) { key := interpreter.PopName() dictionary := interpreter.Pop().(Dictionary) dictionary[key] = nil } + //dict key known bool -> Test whether key is in dict func known(interpreter *Interpreter) { key := interpreter.PopName() dictionary := interpreter.Pop().(Dictionary) interpreter.Push(dictionary[key] != nil) } + //key where (dict true) or false -> Find dictionary in which key is defined func where(interpreter *Interpreter) { key := interpreter.PopName() @@ -92,6 +104,7 @@ func where(interpreter *Interpreter) { interpreter.Push(true) } } + // dict1 dict2 copy dict2 -> Copy contents of dict1 to dict2 func copydict(interpreter *Interpreter) { dict2 := interpreter.Pop().(Dictionary) @@ -101,6 +114,7 @@ func copydict(interpreter *Interpreter) { } interpreter.Push(dict2) } + //dict proc forall – -> Execute proc for each entry in dict func foralldict(interpreter *Interpreter) { proc := NewProcedure(interpreter.PopProcedureDefinition()) @@ -111,34 +125,42 @@ func foralldict(interpreter *Interpreter) { proc.Execute(interpreter) } } + //– currentdict dict -> Return current dictionary func currentdict(interpreter *Interpreter) { interpreter.Push(interpreter.PeekDictionary()) } + //– systemdict dict -> Return system dictionary func systemdict(interpreter *Interpreter) { interpreter.Push(interpreter.SystemDictionary()) } + //– userdict dict -> Return writeable dictionary in local VM func userdict(interpreter *Interpreter) { interpreter.Push(interpreter.UserDictionary()) } + //– globaldict dict -> Return writeable dictionary in global VM func globaldict(interpreter *Interpreter) { interpreter.Push(interpreter.UserDictionary()) } + //– statusdict dict -> Return product-dependent dictionary func statusdict(interpreter *Interpreter) { interpreter.Push(interpreter.UserDictionary()) } + //– countdictstack int -> Count elements on dictionary stack func countdictstack(interpreter *Interpreter) { interpreter.Push(float64(interpreter.DictionaryStackSize())) } + //array dictstack subarray -> Copy dictionary stack into array func dictstack(interpreter *Interpreter) { panic("No yet implemenented") } + //– cleardictstack – -> Pop all nonpermanent dictionaries off dictionary stack func cleardictstack(interpreter *Interpreter) { interpreter.ClearDictionaries() diff --git a/postscript/operators_relational.go b/postscript/operators_relational.go index c1e708b..d5cbdd7 100644 --- a/postscript/operators_relational.go +++ b/postscript/operators_relational.go @@ -3,7 +3,6 @@ package postscript - func eq(interpreter *Interpreter) { value1 := interpreter.Pop() value2 := interpreter.Pop() diff --git a/postscript/operators_stack.go b/postscript/operators_stack.go index 6ee0c6b..fd313a7 100644 --- a/postscript/operators_stack.go +++ b/postscript/operators_stack.go @@ -8,6 +8,7 @@ package postscript func pop(interpreter *Interpreter) { interpreter.Pop() } + //any1 any2 exch any2 any1 -> Exchange top two elements func exch(interpreter *Interpreter) { value1 := interpreter.Pop() @@ -15,6 +16,7 @@ func exch(interpreter *Interpreter) { interpreter.Push(value1) interpreter.Push(value2) } + //any dup any any -> Duplicate top element func dup(interpreter *Interpreter) { interpreter.Push(interpreter.Peek()) @@ -28,11 +30,13 @@ func copystack(interpreter *Interpreter) { interpreter.Push(value) } } + //anyn … any0 n index anyn … any0 anyn -> Duplicate arbitrary element func index(interpreter *Interpreter) { f := interpreter.PopInt() interpreter.Push(interpreter.Get(int(f))) } + //anyn−1 … any0 n j roll any(j−1) mod n … any0 anyn−1 … anyj mod n -> Roll n elements up j times func roll(interpreter *Interpreter) { j := interpreter.PopInt() @@ -43,20 +47,25 @@ func roll(interpreter *Interpreter) { interpreter.Push(values[(n+i-j)%n]) } } + //any1 … anyn clear -> Discard all elements func clear(interpreter *Interpreter) { interpreter.ClearOperands() } + //any1 … anyn count any1 … anyn n -> Count elements on stack func count(interpreter *Interpreter) { interpreter.Push(interpreter.OperandSize()) } + //Mark type Mark struct{} + //– mark mark -> Push mark on stack func mark(interpreter *Interpreter) { interpreter.Push(Mark{}) } + //mark obj 1 … obj n cleartomark – -> Discard elements down through mark func cleartomark(interpreter *Interpreter) { value := interpreter.Pop() @@ -64,6 +73,7 @@ func cleartomark(interpreter *Interpreter) { value = interpreter.Pop() } } + //mark obj 1 … obj n counttomark mark obj 1 … obj n n -> Count elements down to mark func counttomark(interpreter *Interpreter) { i := 0 diff --git a/resource/result/TestAndroid.png b/resource/result/TestAndroid.png index ea0be1b..ffa068b 100644 Binary files a/resource/result/TestAndroid.png and b/resource/result/TestAndroid.png differ diff --git a/resource/result/TestBubble.png b/resource/result/TestBubble.png index f30ec3a..29fff3f 100644 Binary files a/resource/result/TestBubble.png and b/resource/result/TestBubble.png differ diff --git a/resource/result/TestCurveRectangle.png b/resource/result/TestCurveRectangle.png index e19cb77..2220ee7 100644 Binary files a/resource/result/TestCurveRectangle.png and b/resource/result/TestCurveRectangle.png differ diff --git a/resource/result/TestDash.png b/resource/result/TestDash.png index 67f7f91..324fa3d 100644 Binary files a/resource/result/TestDash.png and b/resource/result/TestDash.png differ diff --git a/resource/result/TestDrawArc.png b/resource/result/TestDrawArc.png index 0f6fac1..85b04af 100644 Binary files a/resource/result/TestDrawArc.png and b/resource/result/TestDrawArc.png differ diff --git a/resource/result/TestDrawArcNegative.png b/resource/result/TestDrawArcNegative.png index 86de15e..6fb9fa8 100644 Binary files a/resource/result/TestDrawArcNegative.png and b/resource/result/TestDrawArcNegative.png differ diff --git a/resource/result/TestDrawCubicCurve.png b/resource/result/TestDrawCubicCurve.png index 552f065..7cff371 100644 Binary files a/resource/result/TestDrawCubicCurve.png and b/resource/result/TestDrawCubicCurve.png differ diff --git a/resource/result/TestDrawImage.png b/resource/result/TestDrawImage.png index 7836523..c1b377d 100644 Binary files a/resource/result/TestDrawImage.png and b/resource/result/TestDrawImage.png differ diff --git a/resource/result/TestFillString.png b/resource/result/TestFillString.png index 4215391..c3a6992 100644 Binary files a/resource/result/TestFillString.png and b/resource/result/TestFillString.png differ diff --git a/resource/result/TestFillStroke.png b/resource/result/TestFillStroke.png index a992394..3582b64 100644 Binary files a/resource/result/TestFillStroke.png and b/resource/result/TestFillStroke.png differ diff --git a/resource/result/TestFillStyle.png b/resource/result/TestFillStyle.png index 0da7af5..ad23dda 100644 Binary files a/resource/result/TestFillStyle.png and b/resource/result/TestFillStyle.png differ diff --git a/resource/result/TestGopher.png b/resource/result/TestGopher.png index b0097ee..aac6491 100644 Binary files a/resource/result/TestGopher.png and b/resource/result/TestGopher.png differ diff --git a/resource/result/TestLineJoin.png b/resource/result/TestLineJoin.png index 8991896..f6605e5 100644 Binary files a/resource/result/TestLineJoin.png and b/resource/result/TestLineJoin.png differ diff --git a/resource/result/TestPathTransform.png b/resource/result/TestPathTransform.png index e5e52f5..45bf578 100644 Binary files a/resource/result/TestPathTransform.png and b/resource/result/TestPathTransform.png differ diff --git a/resource/result/TestPostscript.png b/resource/result/TestPostscript.png index abcacbc..e5a83e1 100644 Binary files a/resource/result/TestPostscript.png and b/resource/result/TestPostscript.png differ diff --git a/resource/result/TestRoundRectangle.png b/resource/result/TestRoundRectangle.png index 173417b..9b5ef12 100644 Binary files a/resource/result/TestRoundRectangle.png and b/resource/result/TestRoundRectangle.png differ diff --git a/resource/result/TestStar.png b/resource/result/TestStar.png index 43cf476..65c7ec7 100644 Binary files a/resource/result/TestStar.png and b/resource/result/TestStar.png differ diff --git a/resource/result/TestTransform.png b/resource/result/TestTransform.png index 40fc352..7cd821b 100644 Binary files a/resource/result/TestTransform.png and b/resource/result/TestTransform.png differ diff --git a/wingui/winapi.go b/wingui/winapi.go index 2ae48d3..33411df 100644 --- a/wingui/winapi.go +++ b/wingui/winapi.go @@ -4,13 +4,12 @@ package wingui import ( - "syscall" - "unsafe" "fmt" "os" + "syscall" + "unsafe" ) - func abortf(format string, a ...interface{}) { fmt.Fprintf(os.Stdout, format, a...) os.Exit(1) diff --git a/wingui/zwinapi.go b/wingui/zwinapi.go index 9ced49b..b4af1e9 100644 --- a/wingui/zwinapi.go +++ b/wingui/zwinapi.go @@ -1,6 +1,5 @@ package wingui - import "unsafe" import "syscall"