Solved

Region from a bitmap area

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…
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…

737 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