Solved

Polygonal Image in Delphi 1

Posted on 1998-12-23
3
296 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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 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…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

708 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

16 Experts available now in Live!

Get 1:1 Help Now