Solved

Region from a bitmap area

Posted on 2004-09-26
3
270 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
[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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

By default, Carbonite Server Backup manages your encryption key for you using Advanced Encryption Standard (AES) 128-bit encryption. If you choose to manage your private encryption key, your backups will be encrypted using AES 256-bit encryption.
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 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 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…

724 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