Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Polygonal Image in Delphi 1

Posted on 1998-12-23
3
Medium Priority
?
315 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 60 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

715 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