Solved

How to bypass the Windows system palette for colorbanding (gradient colors)

Posted on 1997-05-31
1
153 Views
Last Modified: 2010-04-06
In a D2 app. I present sampled data in trendcurves, using normal Delphi
routines like Canvas.MoveTo, Canvas.LineTo etc.
Now i'd like to extend the capabilities and plot the data as you sometimes
can see it in a wheather chart (all colors having gradients).
If I use the normal Delphi methods, the colors are rounded to the
NearestColor. That's not what I want since I know the video card is able to
display more precise colors.
Can anyone help me or explain it a little bit?
(Note: I already have digged into sourcecode of gradientform,
gradientcaption and gradientbutton, all found on DSP but that's not giving
the right solution).
Many thanks in advance.

0
Comment
Question by:elpeedee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
StevenB earned 50 total points
ID: 1336699
 There are many solutions to the problem involving palette manipulation etc. however I suspect that the quickest solution for you will be this:

  If you use LineTo to generate the display output then you are using a Pen to generate the colour(color, are you un the US?). Pen colours are always rounded as you say to the nearest palette entry. If however you use a Brush to define the colour then the diplay will dither the colours for you as you are requesting. To use a Brush then you simply have to use the Rectangle command, for example, rather than a LineTo.

  Incidentally, in high colour mode the pen colours will be displayed correctly as the palette will have enough entries to accurately represent your output.

  Steven.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question