Solved

Region from a bitmap area

Posted on 2004-09-26
3
267 Views
Last Modified: 2013-11-15
Hi,

I have a bitmap which is made up of three colours (red, green, white and black).  The colours are in big 'splotches' on the bitmap.  What I want to be able to do is, if I click a colour, it returns a region for that colour.  I then need to some how save those regions to recall later on (to see if the same region has been clicked in before).

The regions are semi-circular in shape, never overlap, and are bordered with a black surround.

Thanks for any help.

Stu
0
Comment
Question by:Stuart_Johnson
3 Comments
 
LVL 33

Assisted Solution

by:Slick812
Slick812 earned 25 total points
ID: 12155854
hello Stuart Johnson , , getting a windows Region from a color on a Bitmap is not so easy, you might look a the code in this EE Question, to see an example for that - -


http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20353055.html

I have trouble understanding when you say -
" I then need to some how save those regions to recall later on"

do you mean save the regions to file storage or what?
0
 
LVL 6

Accepted Solution

by:
pritaeas earned 100 total points
ID: 12158834
If you use Windows' Regions, then it is possible to store these to file. You can use functions to add a lot of points at once to a region.

SetWindowRgn, GetWindowRgn, CreatePolygonRgn, CreatePolyPolygonRgn, CreateRectRgn, CreateRectRgnIndirect, CreateRoundRectRgn, ExtCreateRegion, GetRegionData are functions to use. For more details see the MSDN.

I'll have to search my backups for a project. I know I have one, but am not sure if I can retrieve it. If I do, I'll post it here.
0
 
LVL 6

Author Comment

by:Stuart_Johnson
ID: 12159035
Hi guys,

I actually changed the way the project was to work today, and this question became invalid.  However, I will look into pritaeas' suggestion in case I need it later.

Thanks,

Stuart.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
All possible software to create bootable backup media 5 47
Delphi: ForceDirectory plain function 7 29
Solaris SUN OS 4.1.3 cloning 6 81
hp laptop model 10 41
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now