[Cuis-dev] Updates to VectorGraphics and precompiled MacVM

Juan Vuletich juan at jvuletich.org
Tue Jun 1 11:44:40 PDT 2021


On 5/24/2021 4:19 PM, David T. Lewis via Cuis-dev wrote:
> On Thu, May 20, 2021 at 10:56:13AM -0300, Juan Vuletich via Cuis-dev wrote:
>> Hi Folks,
>>
>> Recently, I've been working on improving the VectorGraphics plugin. I
>> added a new primitive that will help quick display of SVG icons. Please
>> pull all repos.
>>
>> An updated Mac VM is available at
>> https://www.dropbox.com/sh/6xzdebt158ha1cc/AAAW2LxSYHOSZ8PTfhC9XIs0a?dl=0 .
>>
>> If you are able to build VMs, please try generating VectorEnginePlugin
>> from the updated VMMaker and Cuis-Smalltalk-Dev repos, build for your
>> platform, test, and share the precompiled VMs with us.
>>
>> To see a possible use of the new primitive, play with M3Exp01Morph.
>>
> Attached is a patch to make M3Exp01Morph in VectorGraphics work on a V3
> Cuis image with interpreter VM.
>
> The problem:
>
>    (Float64Array new: 1) at: 1 put: Float pi; yourself. ==>  #[8.619199512815383e97]
>
> With patch applied, it now works:
>
>    (Float64Array new: 1) at: 1 put: Float pi; yourself. ==>  #[3.141592653589793]
>
> I also needed to recompile M3Exp01Morph>>drawOn: to fix the compiled path
> sequences in that method (no change to the method, just a recompile).
>
> Explanation: On images before Cog/Spur, Float objects are stored internally
> in big-endian format. For Cog/Spur, they are stored in the native word
> ordering of the platfrom. Float64Array>>floatAt:put: needs to check image
> format in addition to platform endianness in order to determine if word
> swapping is needed.
>
> Dave

Thanks Dave!

The fix is now at GitHub.

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



More information about the Cuis-dev mailing list