rename test_results to samples

Laurent Le Goff 2015-04-19 23:22:50 +02:00
parent 4243a36c24
commit e85b32a956
23 changed files with 47 additions and 24 deletions

@ -1,12 +1,10 @@
### Test results # Samples
Those samples are largely inspired by this page: Those samples are largely inspired by this page:
> http://cairographics.org/samples/ > http://cairographics.org/samples/
## Test Rectangle ## Test Rectangle
![test_results/TestRectangle.png](test_results/TestPath.png)
```go ```go
func TestRectangle() { func TestRectangle() {
@ -21,8 +19,9 @@ func TestRectangle() {
} }
``` ```
![samples/TestRectangle.png](samples/TestRectangle.png)
## Test Draw Arc ## Test Draw Arc
![test_results/TestDrawArc.png](test_results/TestDrawArc.png)
```go ```go
func TestDrawArc() { func TestDrawArc() {
@ -54,9 +53,9 @@ func TestDrawArc() {
} }
``` ```
## Test Draw Arc Negative ![samples/TestDrawArc.png](samples/TestDrawArc.png)
![test_results/TestDrawArcNegative.png](test_results/TestDrawArcNegative.png)
## Test Draw Arc Negative
```go ```go
func TestDrawArcNegative() { func TestDrawArcNegative() {
@ -88,8 +87,9 @@ func TestDrawArcNegative() {
} }
``` ```
![samples/TestDrawArcNegative.png](samples/TestDrawArcNegative.png)
## Test Curve Rectangle ## Test Curve Rectangle
![test_results/TestCurveRectangle.png](test_results/TestCurveRectangle.png)
```go ```go
func TestCurveRectangle() { func TestCurveRectangle() {
@ -148,8 +148,10 @@ func TestCurveRectangle() {
} }
``` ```
![samples/TestCurveRectangle.png](samples/TestCurveRectangle.png)
## Test Draw Cubic Curve ## Test Draw Cubic Curve
![test_results/TestDrawCubicCurve.png](test_results/TestDrawCubicCurve.png)
```go ```go
func TestDrawCubicCurve() { func TestDrawCubicCurve() {
@ -177,11 +179,13 @@ func TestDrawCubicCurve() {
gc.Stroke() gc.Stroke()
saveToPngFile("TestDrawCubicCurve", i) saveToPngFile("TestDrawCubicCurve", i)
} }
``` ```
![samples/TestDrawCubicCurve.png](samples/TestDrawCubicCurve.png)
## Test Dash ## ## Test Dash ##
![test_results/TestDash.png](test_results/TestDash.png)
![samples/TestDash.png](samples/TestDash.png)
```go ```go
func TestDash() { func TestDash() {
@ -203,7 +207,6 @@ func TestDash() {
``` ```
## Test Fill Stroke ## ## Test Fill Stroke ##
![test_results/TestFillStroke.png](test_results/TestFillStroke.png)
```go ```go
func TestFillStroke() { func TestFillStroke() {
@ -228,8 +231,10 @@ func TestFillStroke() {
} }
``` ```
![samples/TestFillStroke.png](samples/TestFillStroke.png)
## Test Fill Style ## Test Fill Style
![test_results/TestFillStyle.png](test_results/TestFillStyle.png)
```go ```go
func TestFillStyle() { func TestFillStyle() {
@ -262,8 +267,9 @@ func TestFillStyle() {
} }
``` ```
![samples/TestFillStyle.png](samples/TestFillStyle.png)
## Test Multi Segment Caps ## Test Multi Segment Caps
![test_results/TestMultiSegmentCaps.png](test_results/TestMultiSegmentCaps.png)
```go ```go
func TestMultiSegmentCaps() { func TestMultiSegmentCaps() {
@ -284,8 +290,9 @@ func TestMultiSegmentCaps() {
} }
``` ```
![samples/TestMultiSegmentCaps.png](samples/TestMultiSegmentCaps.png)
## Test Round Rectangle ## Test Round Rectangle
![test_results/TestRoundRectangle.png](test_results/TestRoundRectangle.png)
```go ```go
func TestRoundRectangle() { func TestRoundRectangle() {
@ -314,8 +321,9 @@ func TestRoundRectangle() {
} }
``` ```
![samples/TestRoundRectangle.png](samples/TestRoundRectangle.png)
## Test Line Cap ## Test Line Cap
![test_results/TestLineCap.png](test_results/TestLineCap.png)
```go ```go
func TestLineCap() { func TestLineCap() {
@ -348,8 +356,9 @@ func TestLineCap() {
} }
``` ```
![samples/TestLineCap.png](samples/TestLineCap.png)
## Test Line Join ## Test Line Join
![test_results/TestLineJoin.png](test_results/TestLineJoin.png)
```go ```go
func TestLineJoin() { func TestLineJoin() {
@ -376,8 +385,9 @@ func TestLineJoin() {
} }
``` ```
![samples/TestLineJoin.png](samples/TestLineJoin.png)
## Test Bubble ## Test Bubble
![test_results/TestBubble.png](test_results/TestBubble.png)
```go ```go
func TestBubble() { func TestBubble() {
@ -395,8 +405,9 @@ func TestBubble() {
} }
``` ```
![samples/TestBubble.png](samples/TestBubble.png)
## Test Star ## Test Star
![test_results/TestStar.png](test_results/TestStar.png)
```go ```go
func TestStar() { func TestStar() {
@ -415,8 +426,9 @@ func TestStar() {
} }
``` ```
![samples/TestStar.png](samples/TestStar.png)
## Test Transform ## Test Transform
![test_results/TestTransform.png](test_results/TestTransform.png)
```go ```go
func TestTransform() { func TestTransform() {
@ -474,8 +486,9 @@ func TestTransform() {
} }
``` ```
![samples/TestTransform.png](samples/TestTransform.png)
## Test Path Transform ## Test Path Transform
![test_results/TestPathTransform.png](test_results/TestPathTransform.png)
```go ```go
func TestPathTransform() { func TestPathTransform() {
@ -488,8 +501,9 @@ func TestPathTransform() {
} }
``` ```
![samples/TestPathTransform.png](samples/TestPathTransform.png)
## Test Android ## Test Android
![test_results/TestAndroid.png](test_results/TestAndroid.png)
```go ```go
func android(gc *draw2d.GraphicContext, x, y float) { func android(gc *draw2d.GraphicContext, x, y float) {
@ -521,8 +535,9 @@ func android(gc *draw2d.GraphicContext, x, y float) {
} }
``` ```
![samples/TestAndroid.png](samples/TestAndroid.png)
## Test Gopher ## Test Gopher
![test_results/TestGopher.png](test_results/TestGopher.png)
```go ```go
func gordon(gc *draw2d.GraphicContext, x, y, w, h float) { func gordon(gc *draw2d.GraphicContext, x, y, w, h float) {
@ -591,8 +606,9 @@ func gordon(gc *draw2d.GraphicContext, x, y, w, h float) {
} }
``` ```
![samples/TestGopher.png](samples/TestGopher.png)
## Test Fill String ## Test Fill String
![test_results/TestFillString.png](test_results/TestFillString.png)
```go ```go
func TestFillString() { func TestFillString() {
@ -609,3 +625,10 @@ func TestFillString() {
saveToPngFile("TestFillString", i) saveToPngFile("TestFillString", i)
} }
``` ```
![samples/TestFillString.png](samples/TestFillString.png)
## Reference
see corresponding [samples.go](samples/samples.go) file.

BIN
samples/TestAndroid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
samples/TestBigPicture.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
samples/TestBubble.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

BIN
samples/TestDash.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
samples/TestDrawArc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

BIN
samples/TestDrawImage.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
samples/TestFillString.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
samples/TestFillStroke.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
samples/TestFillStyle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

BIN
samples/TestGopher.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
samples/TestLineCap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
samples/TestLineJoin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
samples/TestRectangle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

BIN
samples/TestStar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
samples/TestTransform.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB