<div dir="auto"><br></div><div dir="auto">is there a way to draw lines over top of all the open windows?</div><div dir="auto">like a line from inside of one window to inside of another window?</div><div dir="auto">like arrows from a help window to graphical elements in some other windows?</div><div><br><div class="gmail_quote"><div>On Sat, Jun 24, 2017 at 06:00 Jakob Reschke <<a href="mailto:jakob.reschke@student.hpi.de">jakob.reschke@student.hpi.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Lorenzo,<br>
<br>
Are you familiar with browsing existing code in Squeak already? If<br>
not, I advise you have a look at the Squeak by Example book:<br>
<a href="https://hal.inria.fr/inria-00441576/file/SBE.pdf" rel="noreferrer" target="_blank">https://hal.inria.fr/inria-00441576/file/SBE.pdf</a><br>
It also contains a chapter on drawing your own morphs.<br>
<br>
Otherwise you probably want to have a look at the classes Canvas and<br>
Form. A Form contains pixels and a Canvas can be used to draw things<br>
like points, lines, and other images to a graphical medium. A<br>
FormCanvas (a subclass of Canvas) can be used to draw on a Form. To<br>
display a Form in the world you can use an ImageMorph.<br>
<br>
The following creates a 32-Bit Form of 200x200 pixels, draws two lines<br>
on it and attaches the image to the mouse cursor (hand).<br>
<br>
form := Form extent: 200@200 depth: 32.<br>
canvas := FormCanvas on: form.<br>
canvas line: 0@0 to: 200@200 color: Color red.<br>
canvas line: 200@0 to: 0@200 color: Color blue.<br>
morph := ImageMorph new.<br>
morph image: form.<br>
morph openInHand.<br>
<br>
You can then draw further stuff with the canvas and the morph will be<br>
updated accordingly.<br>
<br>
Does this help you?<br>
<br>
Best regards,<br>
Jakob<br>
<br>
2017-06-23 22:43 GMT+02:00 Lorenzo Berendsen <<a href="mailto:lorenzoberendsen@hotmail.com" target="_blank">lorenzoberendsen@hotmail.com</a>>:<br>
> Hi All,<br>
><br>
><br>
><br>
> I am trying to draw a simples 2D Line in months.<br>
><br>
> I can’t understand what to do.<br>
><br>
><br>
><br>
> Could someone help me with this?<br>
><br>
> I have C, Pascal, VBA background, but none of these knowledge is helping me…<br>
><br>
><br>
><br>
> Regards,<br>
><br>
> Lorenzo.<br>
<br>
</blockquote></div></div>