-
-
Notifications
You must be signed in to change notification settings - Fork 27
Fix POSTSCRIPTSTREAM to refine or default values for COLOR. #2177
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
Fix POSTSCRIPTSTREAM to refine or default values for COLOR. #2177
Conversation
(Don't require them to be FLOATP.)
This corrected the zeros, but now I see that the file EQUATIONEDITORPRGMERSGUIDE.TEDIT is also drawing a curve where the brush has color 7. Are integer colors like this some sort of index into a table of colors?
… On May 31, 2025, at 5:38 PM, Matt Heffron ***@***.***> wrote:
(Don't require them to be FLOATP.)
This resolves #2176 <#2176>.
You can view, comment on, or merge this pull request online at:
#2177
Commit Summary
6a841f0 <6a841f0> Fix POSTSCRIPTSTREAM to accept SMALLP values 0 and 1 as COLOR.
File Changes (3 files <https://github.com/Interlisp/medley/pull/2177/files>)
M library/POSTSCRIPTSTREAM <https://github.com/Interlisp/medley/pull/2177/files#diff-836e34ca40efc69ae4673638214411ef21a8a53f765942dd5e407eaa6afe8ded> (114)
M library/POSTSCRIPTSTREAM.LCOM <https://github.com/Interlisp/medley/pull/2177/files#diff-ff2743be5a3adf057b43978de681fc2651599edb78373ed0aa308d980eb429de> (0)
M library/POSTSCRIPTSTREAM.TEDIT <https://github.com/Interlisp/medley/pull/2177/files#diff-08006b4611d5215594af331a55307c5d439d9dc6d8b551c94ac0ec28df4a5496> (6)
Patch Links:
https://github.com/Interlisp/medley/pull/2177.patch
https://github.com/Interlisp/medley/pull/2177.diff
—
Reply to this email directly, view it on GitHub <#2177>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AQSTUJPKO4TTRWFMCABPIRD3BJDRRAVCNFSM6AAAAAB6KODAQ6VHI2DSMVQWIX3LMV43ASLTON2WKOZTGEYDMMRZGY4TGMI>.
You are receiving this because your review was requested.
|
@rmkaplan there are a few things in can be, but one option is that it's something that is COLORNUMBERP, which is defined on library/LLCOLOR. |
This is the |
Tedit doesn't know about colors in image objects, and it doesn't interpret colors in any other way. DSPCOLOR of a Tedit stream just puts the color-pointer (whatever it is) in the character-looks, and passes that to the back-end image stream through the image-stream's DSPCOLOR.
… On Jun 1, 2025, at 11:43 AM, Matt Heffron ***@***.***> wrote:
MattHeffron
left a comment
(Interlisp/medley#2177)
<#2177 (comment)>
Are integer colors like this some sort of index into a table of colors?
COLORNUMBERP checks against the color map for the screen, so I don't know what it would do for a B/W screen, nor for an imagestream that isn't to the screen.
This is the BRUSHCOLOR of a curve in the second embedded sketch. It appears that color 7 is specified in the sketch, but I don't see how to set the color of a BRUSH to use in the sketch. Is it actually a TEXTURE? So, I don't know how to find out where that "color" came from, and what it should do.
It looks like I might have to dig into SKETCH. How come TEDIT has no problem with that?
—
Reply to this email directly, view it on GitHub <#2177 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AQSTUJOH5ZKZC2LS5L6F22D3BNCUXAVCNFSM6AAAAAB6KODAQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMRXGY3TONJRHA>.
You are receiving this because you were mentioned.
|
I did a bunch of digging through the source code and discovered:
So, I propose that @rmkaplan @hjellinek @masinter Any comments/objections? |
…LP-0-and-1-as-COLOR
…hout other context (e.g., as an index into a color map). POSTSCRIPTSTREAM should behave similar to INTERPRESS and just ignore a BRUSHCOLOR if it is a SMALLP that's neither 0 nor 1, and use the current DSPCOLOR of the stream. If someone wants a specific color, or grayscale, they can use the color descriptions as documented in POSTSCRIPTSTREAM.TEDIT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it, and it worked fine on the problematic equation file. But the paragraph in the documentation beginning "Anywhere that a texture or color..." seems to only allow 0 and 1, should that be updated to describe the other pass-through possibilities ?
…LP-0-and-1-as-COLOR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
(Don't require them to be FLOATP.)
This resolves #2176.