Re: [racket-users] pict polygons

2019-12-17 Thread Spencer Florence
2htdp/image works with pict directly (they are pict-convertible?, and all
pict functions accept those).

If that does work for whatever reason, it shouldnt be terrible to write
that function using ‘dc’ and ‘dc-path%’, and it would make a great PR to
‘pict’!

—spencer

On Tue, Dec 17, 2019 at 8:15 AM Hendrik Boom  wrote:

> I've been looking through pict documentation again, and failed to find
> a way to draw arbitrary polygons.
>
> (at the moment I just want a triangle, but I couldn't even find
> that)
>
> There are triangles in the image.rkt from 2htdp/image, but that seems to
> use
> different data types from pict.
>
> Given the variety of polygons available in pict (such as filled-in
> areas) I would find it surprising if there were no such functionality,
>
> -- hendrik
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/20191217141452.g27usl46rwn556re%40topoi.pooq.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAF4wvDxWjFLvSNon8D2U9FTQHpVc8j5q-6%2BXhJCH3118539xYw%40mail.gmail.com.


Re: [racket-users] pict polygons

2019-12-17 Thread Robby Findler
2htdp/image images should work where Picts work (ie they are pict
convertible).

Robby

On Tue, Dec 17, 2019 at 8:15 AM Hendrik Boom  wrote:

> I've been looking through pict documentation again, and failed to find
> a way to draw arbitrary polygons.
>
> (at the moment I just want a triangle, but I couldn't even find
> that)
>
> There are triangles in the image.rkt from 2htdp/image, but that seems to
> use
> different data types from pict.
>
> Given the variety of polygons available in pict (such as filled-in
> areas) I would find it surprising if there were no such functionality,
>
> -- hendrik
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/20191217141452.g27usl46rwn556re%40topoi.pooq.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAL3TdOMK1QhYXgYv78Zr-4YWu%2BE%3DeLTCqkDWxubOBsJSeePAVw%40mail.gmail.com.


Re: [racket-users] pict polygons SOLVED

2019-12-17 Thread Hendrik Boom
On Tue, Dec 17, 2019 at 09:14:52AM -0500, Hendrik Boom wrote:
> I've been looking through pict documentation again, and failed to find 
> a way to draw arbitrary polygons.

Looks like i found it.

It's dc-path% found in racket/draw.
It connets to pict using the dc function:
(dc draw w h [a d]) → pict?
documented in
https://docs.racket-lang.org/pict/Basic_Pict_Constructors.html

-- hendrik
> 
> (at the moment I just want a triangle, but I couldn't even find 
> that)
> 
> There are triangles in the image.rkt from 2htdp/image, but that seems to use 
> different data types from pict.
> 
> Given the variety of polygons available in pict (such as filled-in 
> areas) I would find it surprising if there were no such functionality,
> 
> -- hendrik
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/racket-users/20191217141452.g27usl46rwn556re%40topoi.pooq.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20191217142924.orsjj7y5oiqesfeo%40topoi.pooq.com.


[racket-users] pict polygons

2019-12-17 Thread Hendrik Boom
I've been looking through pict documentation again, and failed to find 
a way to draw arbitrary polygons.

(at the moment I just want a triangle, but I couldn't even find 
that)

There are triangles in the image.rkt from 2htdp/image, but that seems to use 
different data types from pict.

Given the variety of polygons available in pict (such as filled-in 
areas) I would find it surprising if there were no such functionality,

-- hendrik


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/20191217141452.g27usl46rwn556re%40topoi.pooq.com.