Solved

Region from a bitmap area

Posted on 2004-09-26
3
264 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

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…
How to fix error ""Failed to validate the vCentre certificate. Either install or verify the certificate by using the vSphere Data Protection Configuration utility" when you are trying to connect to VDP instance from Vcenter.
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

743 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

18 Experts available now in Live!

Get 1:1 Help Now