spdegabrielle
2019-8-9 13:22:27

Sorry I just wrapped it in a (beside)


spdegabrielle
2019-8-9 13:22:44

(def light (pt 0.7 0.7))
(set-curve-pict-size 128 128 )

;(save-pict-as-png "logo.png"
 (beside
  ; Here is a flat logo

  (draw (color blue (fill blue-curve))
        (color red  (fill red-left-curve))
        (color red  (fill red-middle-curve)))

  ; A version with a spotlight at (0.7, 0.7).

  (draw (brushcolor "white" (fill (rectangle (pt -1 -1) (pt 1 1))))
        (brushgradient (radial-gradient light 0 light 2 blue-gradient)
                       (draw (fill blue-curve)))
        (color red (fill red-left-curve))
        (color red (fill red-middle-curve)))

  ; A Simple outline version
  (draw blue-curve red-left-curve red-middle-curve)

  ; A simple black and white filled version
  (fill blue-curve red-left-curve red-middle-curve)



  (draw (color blue (fill blue-curve))
        (color red  (fill red-left-curve))
        (color red  (fill red-middle-curve))))

soegaard2
2019-8-9 13:24:09

Laurent discovered bug yesterday- and the fix. Adding a freeze.


spdegabrielle
2019-8-9 13:24:41

I remember now. I can’t have the (def inside the (beside :sob:


spdegabrielle
2019-8-9 17:32:35

Any Racketeers in Tokyo?


laurent.orseau
2019-8-9 17:50:47

Should radial-gradient apply a freeze automatically? Also, it’s probably best to freeze the minimal amount in the picture


spdegabrielle
2019-8-9 17:54:08

I really gotta read the manual to find out what a freeze is…


laurent.orseau
2019-8-9 18:01:47

Afaiu and fttomh, freeze turns a pict, which is a set of relations basically, to a bitmap, which is a flat pixel map.


laurent.orseau
2019-8-9 18:02:39

But keeps it as a pict structure


laurent.orseau
2019-8-9 18:03:17

(but I may recall wrongly)


spdegabrielle
2019-8-9 18:04:16

Nice


soegaard2
2019-8-9 19:10:31

I think the gradient bug is due to something I have missed regarding the coordinate transformation from pattern pace to user space. But until I figure out what, adding a freeze could be used as a temporary fix.


badkins
2019-8-9 20:55:31

“One can even conjecture that Lisp owes its survival specifically to the fact that its programs are lists, which everyone, including me, has regarded as a disadvantage.” - John McCarthy, “History of Lisp”, 1979