Solved

Polygonal Image in Delphi 1

Posted on 1998-12-23
3
304 Views
Last Modified: 2010-04-04
Can I have in Delphi 1 TImage Component with polygonal frame. Part between polygonal frame and component's rectangle must be transparent
0
Comment
Question by:extra
[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 3

Expert Comment

by:Matvey
ID: 1352695
How about just drawing the image, leaving what's behind uncovered? What do you mean exactly?
0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 20 total points
ID: 1352696
You coudl do it like this:

1. Intercept the WM_ERASEBKGRND (sp?) message and stop it.
2. Override the paint method and set the clipregion to be the appropriate polygonal region (see CreatePolygonRgn for how to do this))
3. Permit the paint to do its thing
4. Unset the clipping region (this may not be strictly necessary...)

Cheers,

Raymond.
0
 
LVL 10

Expert Comment

by:viktornet
ID: 1352697
You could have a masked bitmap that will leave only that on the form...
The part you want to be left on the form should be white and everything to be hidded outside the  polygon should be black....than you AND the original image to the screen, and XOR the mask over the original and you'll get your polygon... If you want me to write you an example let me know..it's pretty easy ;-)

Merry Chrismtas to all!

-Viktor
--Ivanov
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 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