[Cuis-dev] VectorGraphics and Morph

Juan Vuletich juan at jvuletich.org
Wed Jun 24 12:41:34 PDT 2020


On 6/19/2020 7:41 AM, Hilaire Fernandes via Cuis-dev wrote:
> ...
>
> Juan, about my request. An intermediate step to the whole Vector 
> things for the Cuis display is a kind of PasteUpMorph accepting sub 
> morphs directly rendered with vectorCanvas instance. I will be the 
> first client with DrGeo to test  and to use it. It could be a next 
> step to Dyanbook display too.
>
> Hilaire
>
> -- 
> GNU Dr. Geo
> http://drgeo.eu
> https://pouet.chapril.org/@hilaire

Ok. Try the attached files. I'm not really happy with the 
implementation. The design of Morphic allows for different drawing 
canvases, but not really for switching between them during drawing. So, 
what I'm sending here is rather hacky.

Still, you can try the script below. Please set a TrueType font before 
trying this. Also, do Feature require: 'SVG'. Try this is an image 
without unsaved work. It is likely you'll need to kill it, for instance 
by using the halos.

w _ VectorGraphicsPasteUpMorph new openInWorld morphExtent: 1000 at 800.
[
[
     m _ SVGMainMorph fromFileNamed: 'VectorGraphics/SVGSamples/lionx.svg'.
] on: SVGWarning do: [ :warning | warning print. warning resume ]
] on: PathCommandError do: [ :error | error print. error return ].
w addMorph: m.
w addMorph: EllipseMorph new.
w addMorph: BorderedRectMorph new.
w addMorph: RectangleLikeMorph new.

I hope this helps you get a feel of what can be done.

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/20200624/97e86d0d/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: VectorGraphicsPasteUpMorph-ChangesTo-VectorGraphics-jmv.008.cs.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200624/97e86d0d/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: VectorGraphicsPasteUpMorph-CuisCore-JuanVuletich-2020Jun23-16h21m-jmv.001.cs.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200624/97e86d0d/attachment-0001.ksh>


More information about the Cuis-dev mailing list