Subject:
|
Re: What does a subpart with color=24 mean?
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Tue, 5 Sep 2006 18:46:44 GMT
|
Viewed:
|
2389 times
|
| |
| |
In lugnet.cad.dev, Mark Tarrabain wrote:
> Right... but what should the contrast color be defined as within the
> subfile? The same?
The contrast color within the subfile would be defined in the normal way - use
the main color for the subfile, and look up the contrast color from the color
table.
The fact that the originating linetype 1 used color code 24 shouldn't matter by
the time the renderer is determining the contrast color for the subfile.
for example, a simple recursive rendering function might be psuedo-coded as
(leaving out details we don't care about):
function renderLdrawFile(fileName, mainColor) {
// look up edge color
var constrastColor = findContrastColor(mainColor)
for each line in fileName {
var localColor = line.color
if localColor == 16 then localColor = mainColor
if localColor == 24 then localColor = contrastColor
if line.lineType == 1 {
renderLdrawFile(line.file, localColor)
}
}
}
Steve
|
|
Message has 1 Reply: | | Re: What does a subpart with color=24 mean?
|
| Okay... that makes sense. But what if the contrast color for the current file's main color is just an RGB value rather than a color index? What should the subfile's contrast color be set to in that case? Thank you for your help, by the way. >> Mark (...) (18 years ago, 5-Sep-06, to lugnet.cad.dev)
|
Message is in Reply To:
12 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|