To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 4615
4614  |  4616
Subject: 
Re: LDraw extended colors (for Paul Gyugyi)
Newsgroups: 
lugnet.cad.dev
Date: 
Thu, 27 Apr 2000 15:26:24 GMT
Viewed: 
1008 times
  
Lars C. Hassing wrote in http://www.lugnet.com/cad/dev/?n=4187
(snip)
During implementation of Gyugyi's Direct Colors, I browsed his LDLite code:
(snip)
and read his doc:
(snip)
The code and the doc doesn't match!
If the code is the "truth", then the hex ranges in the last two
paragraphs should be swapped:
(snip)
Please decide which to change, the code or the doc.
(FYI MLCad follows the code)

Well, Paul, have you decided?

Also I would like to suggest that 16 is replaced with 17 (0x11):

|      zcp->r = 17 * ((c & 0x00000f00) >> 8);
|      zcp->g = 17 * ((c & 0x000000f0) >> 4);
|      zcp->b = 17 * ((c & 0x0000000f) >> 0);

In this way the max color intensity of 15 (0xF) gets mapped to 255 (0xFF)
in stead of just 240 (0xF0).

What do you think?
/Lars



Message has 1 Reply:
  Re: LDraw extended colors (for Paul Gyugyi)
 
(...) I just now noticed the thread. (Thanks for the email). I'll add support for the 24-bit range, it is a good idea. I'll look into the documentation bug. The code is correct and I'll change the docs to match. For the scaling, multiplying by 17 (...) (25 years ago, 5-May-00, to lugnet.cad.dev)

Message is in Reply To:
  Re: LDraw extended colors
 
(...) During implementation of Gyugyi's Direct Colors, I browsed his LDLite code: | if ((c >= 0x4000000) && (c <= 0x7ffffff)) | { | /Numbers of 0x4000000 to 0x7ffffff are hard coded color values. | zcp->r = 16 * ((c & 0x00000f00) >> 8); | zcp->g = (...) (25 years ago, 20-Mar-00, to lugnet.cad.dev)

6 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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR