[Cuis-dev] Circular toolbar
Juan Vuletich
juan at jvuletich.org
Wed May 20 12:19:01 PDT 2020
On 5/20/2020 11:23 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> The sub-optimal rendering of the complete ring is a bit slow but it is
> expected.
>
> With imageForm 0:00:00:01.409
>
> Without imageForm 0:00:00:01.266
>
>
> | c p center draw |
> "Feature require: 'VectorGraphics'."
> c _ VectorCanvas onForm: Display.
> center _ 1300 at 400.
> draw _ [: angle |
> c strokeWidth: 3 color: Color blue darker fillColor: (Color blue lighter alpha:0.6) do: [ :e |
> p _ (Point r: 140 degrees: 80 + angle) * (1@ -1) + center.
> e abs_MoveToX: p x y: p y.
> p _ (Point r: 200 degrees: 80 + angle ) * (1@ -1) + center.
> e abs_LineToX: p x y: p y.
> p _ (Point r: 200 degrees: 100 + angle) * (1@ -1) + center.
> e abs_ArcToX: p x y: p y radiusX: 200 radiusY: 200 angleOfXAxis: 20 degreesToRadians largeFlag: false sweepFlag: false.
> p _ (Point r: 140 degrees: 100 + angle ) * (1@ -1) + center.
> e abs_LineToX: p x y: p y.
> p _ (Point r: 140 degrees: 80 + angle) * (1@ -1) + center.
> e abs_ArcToX: p x y: p y radiusX: 140 radiusY: 140 angleOfXAxis: 20 degreesToRadians largeFlag: false sweepFlag: true].
> Display forceToScreen.
> p _ (Point r: 170 degrees: 90 + angle) * (1@ -1) + center - 24 asPoint.
> DrGIcons line displayOn: Display at: p rule: Form blend].
>
> [0 to: 20 * 17 by: 20 do: [:each | draw value: each]] durationToRun
>
>
> --
> GNU Dr. Geo
> http://drgeo.eu
Congratulations! This is great! You and Dr. Geo are the first user of
VectorGraphics in Cuis. I'm really happy this is finally happening!
Until the VectorGraphics engine is ready to become the main Canvas, I
suggest caching the result in a Form, and use that in your morphs.
That's what we are doing with TrueType, and it works well.
Cheers,
--
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200520/6e0be3c5/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 49151 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200520/6e0be3c5/attachment-0001.jpe>
More information about the Cuis-dev
mailing list