Solved

Region from a bitmap area

Posted on 2004-09-26
3
268 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 34

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
Are you looking to recover an email message or a contact you just deleted mistakenly? Or you are searching for a contact that you erased from your MS Outlook ‘Contacts’ folder and now realized that it was important.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
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…

821 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