473,385 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Coloring non generic contours

Hi,

I am drawing the picture programmatically (since the picture can differ according to run time values of the parameters in my application). I end up with non generic closed contours (which consist of straight lines and curves). Now I need to fill those with different colors. Any idea how can I accomplish this?

Thanks in advance.

P.S. I have attached two images. The first one is what I am getting, and the second is how it should look like when colored.
Attached Images
File Type: gif ScreenHunter_02 Dec. 13 23.26.gif (2.7 KB, 176 views)
File Type: gif ScreenHunter_01 Dec. 13 14.32.gif (2.7 KB, 184 views)
Dec 14 '10 #1
1 1885
GaryTexmo
1,501 Expert 1GB
I'm not sure, perhaps someone with more GDI+ knowledge than I have will have an idea, but my suggestion is to use a filled polygon to do the colouring.

How are you drawing your curves? If you're generating points you should be able to build a mesh and draw it. Oh it also seems that there's a FillClosedCurve method that may help out as well.
Dec 14 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Ruthless | last post by:
hello. I've got a simple question. I've searched on google for PHP scripts coloring syntax e.g. asm, c, c++, bash etc. I've only found some CGI, apps, modules for Apache - but i can't use...
2
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and...
5
by: Sami Viitanen | last post by:
Hello, Is there an easy way to make script print text with differents colors to screen (shell)? I mean a script that can for example print lines in red if some error occurs in executing some...
1
by: Afanasiy | last post by:
What's the best method for coloring simple markup? <xyz att="val" att="val"> You can assume it is not HTML or XML or valid anything except markup which happens to look somewhat like them. ...
0
by: Markk | last post by:
Hi. I would like to ask If somebody don't have any small sample to coloring XML syntax, e.g. in RichTextBox. It can be in VB.NET or C#. I watched on SharpDevelop, but I could not understand...
2
by: Dan | last post by:
I'd like to show some XML text into an (editable) text box with some syntax coloring for tags, attributes etc. I don't need a full-blown commercial control, I'd just like to do some coloring on...
5
by: Wilfried Mestdagh | last post by:
Hello, I wants to set the background color of rows in a datagridView based on the value of a particular cell. Someone knows how to do this ? -- rgds, Wilfried http://www.mestdagh.biz
1
by: not_a_commie | last post by:
Can somebody give me some references on how to convert a list of contours (topographical map) into a mesh? Thanks.
7
by: braver | last post by:
Greetings -- as a long time user of both Python and Ruby interpreters, I got used to the latter's syntax-coloring gem, wirble, which colorizes Ruby syntax on the fly. Is there anything similar for...
3
by: sandromani | last post by:
Hi all, I am writing a webbased notepad and want to include syntax-coloring. The approach I have used is to set the font color and background color of the textarea to transparent, and place the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.