diff --git a/draw2d/advanced_path.go b/draw2d/advanced_path.go index 5cce444..68f1d78 100644 --- a/draw2d/advanced_path.go +++ b/draw2d/advanced_path.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 13/12/2010 by Laurent Le Goff + package draw2d import ( diff --git a/draw2d/arc.go b/draw2d/arc.go index 7e8b78e..0698b8d 100644 --- a/draw2d/arc.go +++ b/draw2d/arc.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff + package draw2d import ( diff --git a/draw2d/curves.go b/draw2d/curves.go index a2f4d9a..4623cd4 100644 --- a/draw2d/curves.go +++ b/draw2d/curves.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff + package draw2d import ( diff --git a/draw2d/dasher.go b/draw2d/dasher.go index 102635c..5210299 100644 --- a/draw2d/dasher.go +++ b/draw2d/dasher.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 13/12/2010 by Laurent Le Goff + package draw2d type DashVertexConverter struct { diff --git a/draw2d/demux_converter.go b/draw2d/demux_converter.go index fd9ea4c..b5c871d 100644 --- a/draw2d/demux_converter.go +++ b/draw2d/demux_converter.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 13/12/2010 by Laurent Le Goff + package draw2d type DemuxConverter struct { diff --git a/draw2d/font.go b/draw2d/font.go index a0e7650..61c39ff 100644 --- a/draw2d/font.go +++ b/draw2d/font.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 13/12/2010 by Laurent Le Goff + package draw2d import ( diff --git a/draw2d/gc.go b/draw2d/gc.go index 105ba23..8ced348 100644 --- a/draw2d/gc.go +++ b/draw2d/gc.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff + package draw2d import ( @@ -15,8 +16,9 @@ const ( ) type GraphicContext interface { - BeginPath() Path + // Create a new path + BeginPath() GetMatrixTransform() MatrixTransform SetMatrixTransform(tr MatrixTransform) ComposeMatrixTransform(tr MatrixTransform) diff --git a/draw2d/image.go b/draw2d/image.go index 9df39e4..1ff136d 100644 --- a/draw2d/image.go +++ b/draw2d/image.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff + package draw2d import ( diff --git a/draw2d/math.go b/draw2d/math.go index 9323818..c4bb761 100644 --- a/draw2d/math.go +++ b/draw2d/math.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff + package draw2d import ( diff --git a/draw2d/paint.go b/draw2d/paint.go index f2f8fc1..885d993 100644 --- a/draw2d/paint.go +++ b/draw2d/paint.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff + package draw2d /* diff --git a/draw2d/path.go b/draw2d/path.go index 558b433..ab51810 100644 --- a/draw2d/path.go +++ b/draw2d/path.go @@ -1,13 +1,22 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff + package draw2d type Path interface { + // Return the current point of the path LastPoint() (x, y float64) + // Create a new subpath that start at the specified point MoveTo(x, y float64) + // Create a new subpath that start at the specified point + // relative to the current point RMoveTo(dx, dy float64) + // Add a line to the current subpath LineTo(x, y float64) + // Add a line to the current subpath + // relative to the current point RLineTo(dx, dy float64) + QuadCurveTo(cx, cy, x, y float64) RQuadCurveTo(dcx, dcy, dx, dy float64) CubicCurveTo(cx1, cy1, cx2, cy2, x, y float64) diff --git a/draw2d/path_adder.go b/draw2d/path_adder.go index 4e64c64..c5efd2b 100644 --- a/draw2d/path_adder.go +++ b/draw2d/path_adder.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 13/12/2010 by Laurent Le Goff + package draw2d import ( diff --git a/draw2d/path_converter.go b/draw2d/path_converter.go index 9f6a763..0ef96b8 100644 --- a/draw2d/path_converter.go +++ b/draw2d/path_converter.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 06/12/2010 by Laurent Le Goff + package draw2d import ( diff --git a/draw2d/path_storage.go b/draw2d/path_storage.go index 57b6f91..c2a8870 100644 --- a/draw2d/path_storage.go +++ b/draw2d/path_storage.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff + package draw2d import ( diff --git a/draw2d/rgba_interpolation.go b/draw2d/rgba_interpolation.go index 5b065f6..d34a33b 100644 --- a/draw2d/rgba_interpolation.go +++ b/draw2d/rgba_interpolation.go @@ -1,4 +1,7 @@ +// Copyright 2010 The draw2d Authors. All rights reserved. +// created: 21/11/2010 by Laurent Le Goff // see http://pippin.gimp.org/image_processing/chap_resampling.html + package draw2d import ( diff --git a/draw2d/stack_gc.go b/draw2d/stack_gc.go index cc7b795..8c2cda6 100644 --- a/draw2d/stack_gc.go +++ b/draw2d/stack_gc.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff + package draw2d import ( diff --git a/draw2d/stroker.go b/draw2d/stroker.go index 88a0bb8..9331187 100644 --- a/draw2d/stroker.go +++ b/draw2d/stroker.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 13/12/2010 by Laurent Le Goff + package draw2d type Cap int diff --git a/draw2d/transform.go b/draw2d/transform.go index 1f39b9f..1d89bfa 100644 --- a/draw2d/transform.go +++ b/draw2d/transform.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff + package draw2d import ( diff --git a/draw2d/vertex2d.go b/draw2d/vertex2d.go index c544cd5..4e4d4fd 100644 --- a/draw2d/vertex2d.go +++ b/draw2d/vertex2d.go @@ -1,5 +1,6 @@ // Copyright 2010 The draw2d Authors. All rights reserved. // created: 21/11/2010 by Laurent Le Goff + package draw2d type VertexCommand byte