Comment #2 on issue 1097 by nicolaih...(a)gmail.com: Not all shapes support
borderColor/borderWidth
https://code.google.com/p/moose-technology/issues/detail?id=1097
It is possible to draw an ellipse with a uniform scaled stroke (with cairo).
Athens just don't expose this api. (there was a lenghtly discussion with no
result
http://forum.world.st/Athens-and-ellipse-drawing-tt4754256.html#a4765659)
Here is an example for an ellipse with uniform stroke.
| view |
view := AthensSceneView new.
view
scene: [ :canvas |
| stroke ellipse |
canvas surface clear: Color black.
canvas pathTransform
restoreAfter: [
canvas pathTransform scaleBy: 1 @ 2.
ellipse := canvas
createPath: [ :builder |
builder
absolute;
moveTo: 10 @ 75;
ccwArcTo: 75 @ 140 angle: 90 degreesToRadians;
ccwArcTo: 140 @ 75 angle: 90 degreesToRadians;
ccwArcTo: 75 @ 10 angle: 90 degreesToRadians;
ccwArcTo: 10 @ 75 angle: 90 degreesToRadians ].
canvas setPaint: Color blue.
canvas setShape: ellipse.
canvas draw.
stroke := canvas setStrokePaint: Color red.
stroke width: 8.
"---------------- all the following uses athens-cairos PRIVATE api
--------------"
"load the path with the current active (scaled) matrix"
canvas newPath.
canvas loadPath: ellipse ].
"explicit set the (restored/identity) pathMatrix"
canvas setPathMatrix.
"dont call draw it would again load the path with the now active
pathtransform"
"just load the color and render the stroke"
stroke prepareForDrawingOn: canvas.
canvas stroke ].
view openInWindow.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings