[Cuis-dev] VectorGraphics issue?
Juan Vuletich
juan at cuis.st
Sun Sep 6 05:55:53 PDT 2026
Hi Hilaire,
In a recent bunch of updates I removed support for translucent
backgrounds in the regular (whole pixel) Vector Engine for performance.
But it is still available in the slower subpixel code. I've just added a
new Canvas creation method to make this more convenient to use.
In your example, if you initially paint the form with any opaque color,
it works as expected:
| icon canvas iconExtent |
iconExtent := 50 @ 50.
icon := Form extent: iconExtent depth: 32.
icon fillColor: Color white.
" icon fillColor: Color orange."
canvas := VectorCanvas onForm: icon.
canvas fillColor: `Color white alpha: 0.5` do: [
canvas moveTo: 0 at 0;
lineTo: iconExtent x @0;
lineTo: 0 @ iconExtent y;
lineTo: 0 at 0].
icon
Using the new method, you get a correct translucent icon:
| icon canvas iconExtent |
iconExtent := 50 @ 50.
icon := Form extent: iconExtent depth: 32.
canvas := VectorCanvas onFormWithTranslucency: icon.
canvas fillColor: `Color orange alpha: 0.5` do: [
canvas moveTo: 0 at 0;
lineTo: iconExtent x @0;
lineTo: 0 @ iconExtent y;
lineTo: 0 at 0].
icon
I think this solves the issue.
Cheers,
On 2026-09-05 5:21 PM, Hilaire Fernandes via Cuis-dev wrote:
>
> I observe this issue since last update. The area is not painted as
> expected and there is an unsolicited black border.
>
> | icon canvas iconExtent |
> iconExtent := 50 @ 50.
> icon := Form extent: iconExtent depth: 32.
> canvas := VectorCanvas onForm: icon.
> canvas fillColor: `Color white alpha: 0.5` do: [
> canvas moveTo: 0 at 0;
> lineTo: iconExtent x @0;
> lineTo: 0 @ iconExtent y;
> lineTo: 0 at 0].
> icon
>
> --
> http://mamot.fr/@drgeo
>
--
Juan Vuletich
www.cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260906/f8d26d41/attachment.htm>
More information about the Cuis-dev
mailing list