Solved

Polygonal Image in Delphi 1

Posted on 1998-12-23
3
302 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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 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