-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
colorize but only for the outline color of a pict #82
Comments
This seems like a nice addition to the library; maybe |
To me it feels more natural to have separate functions for the outline and the fill color (to me the logical grouping would be one function for line color/width/dash style and another for fill color/texture). But I only have a little experience with Pict, so I don't know which would work better. |
Metapict has a collection of functions that control the pen and brush of a pict. https://docs.racket-lang.org/metapict/index.html#%28part._.Pen_.Adjusters%29 In this case, I think you want |
Ah, that is indeed what I was looking for. Perhaps I should look into Metapict. As I said in another comment, Metapict seemed to me like an advanced extension to Pict with lots of fancy functions, so I wanted to learn the base library first. |
Sounds to me like you're ready for metapict! I'd say that the separation between the libraries is more a product of history than a careful design that learners are meant to progress through. |
Metapict is a great library but I also think that both this and the suggestion in #81 would be good to add to pict itself. |
I think the polygon functions in 2htdp/image are pretty well developed --
maybe a good way to go would be to share some part of the implementation
between the two libraries.
As for the line coloring function, I completely agree.
Robby
…On Tue, Dec 19, 2023 at 7:06 AM Sam Tobin-Hochstadt < ***@***.***> wrote:
Metapict is a great library but I also think that both this and the
suggestion in #81 <#81> would be
good to add to pict itself.
—
Reply to this email directly, view it on GitHub
<#82 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADBNMBKGHKF4LH6RZEA2QLYKGGM5AVCNFSM6AAAAABAZGIKTWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRSG4ZDKNRUG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
It would indeed be natural for the pen and brush adjusters to live in The code lives here: |
Pict has adjuster functions
linewidth
andlinestyle
to adjust the properties of the outline of a pict, andcolorize
which changes either the fill color or both the fill color and outline color depending on which ones are not specified (as far as I can tell). Is there a way to change only the outline color of an existing pict? To me it feels more "functional" to compose line styles and colors with(linewidth <style> <pict>)
than to specify#:border-color
and#:color
keyword arguments for each kind of function that creates new picts.The text was updated successfully, but these errors were encountered: