<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 6, 2023 at 7:23 PM Eduardo Ochs <<a href="mailto:eduardoochs@gmail.com">eduardoochs@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Hi Lauren,<br><br>can you send detailed instructions for how to run your code?<br>I will need to learn how to use canvases soon(*) and your<br>code looks like a good starting point...<br></div></div></blockquote><div><br></div><div>See attachment.</div><div>I added antialiasing to the drawing.</div><div>Not sure it improved things...</div><div><br></div><div>Best,</div><div>Karl</div><div><br></div><div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br>  Thanks in advance! =)<br>    Eduardo Ochs<br>    <a href="http://anggtwu.net/eev-squeak.html" target="_blank">http://anggtwu.net/eev-squeak.html</a><br><br><br>(*): actually I tried to write a drawing program a few weeks<br>ago, but that turned out to be far above my level, and I am<br>still working on debugging tools and on ways to organize my<br>note... =(<br></div><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 5 Mar 2023 at 03:07, Lauren Pullen <<a href="mailto:drurowin@gmail.com" target="_blank">drurowin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi List,<br>
<br>
After much pulling of my hair out on how to make GradientFillStyle work,<br>
I managed to get an EllipseMorph with a raised border.<br>
<br>
I've brute forced it by calling fillOval: twice; first call for the<br>
border, then again for the innards.  FormCanvas and BalloonCanvas do not<br>
draw the same ellipse, scaled; the difference at a small radius is quite<br>
noticeable.<br>
<br>
Here is the code I've got.  It only works with opaque filling, but<br>
that's all I need it to work with.  (I mean, it doesn't crash... but<br>
it's certainly wrong.)  I think I got the border width math correct?<br>
How would List tackle this?<br>
<br>
drawOn: aCanvas<br>
   "manual drawing of RaisedBorder oval"<br>
<br>
   aCanvas isShadowDrawing<br>
      ifTrue: [^ super drawOn: aCanvas].<br>
   aCanvas<br>
   "draw the border"<br>
      fillOval: self bounds<br>
      fillStyle: ((GradientFillStyle ramp: {<br>
            0.2 -> (self color mixed: 0.65 with: Color white).<br>
            0.5 -> (self color).<br>
            0.8 -> (self color mixed: 0.7 with: Color black)})<br>
         origin: self bounds origin;<br>
         direction: self extent;<br>
         radial: true);<br>
   "fill the inside"<br>
      balloonFillOval: ((self bounds origin + (self borderWidth))<br>
corner: self bounds corner - (self borderWidth))<br>
      fillStyle: self color<br>
      borderWidth: 0<br>
      borderColor: Color transparent<br>
<br>
</blockquote></div></div>
<br>
</blockquote></div></div>