We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GDIUtils.GetTileBitmap Method

Thread ID:

Created:

Updated:

Platform:

Replies:

99990 Jun 24,2011 10:18 AM Jun 29,2011 05:15 AM Windows Forms 2
loading
Tags: HTMLUIControl
Randolph Webb
Asked On June 24, 2011 10:18 AM

Hello Vallarasu

I have a question about the GDIUtils.GetTileBitmap Method
DOC DESCRIPTION: Creates bitmap with specified size and infill. Bitmap sent by parameter will be used to fill destination area. If bitmap is less then destination area, it will be tiled.

- Is there a sample demonstrating usage
- DESIRED SCENARIO: In my continued effort to retrieve a bitmap of the clicked element to use as a drag image cursor, I found this routine. When I click on an element, I’d like to
o retrieve the rectangle of the element
o create a bitmap of the rectangles size
o pass the bitmap and rectangle’s size to this routine to have it fill the bitmap with an image of the clicked element
Is the possible?



Randolph Webb
Replied On June 24, 2011 09:00 PM

Hello Vallarasu

I found a sample called 'Element Coordinates' that shows how to calculate the rectangle of a clicked element. Am I correct in assuming that calling this method with that rectangle and a bitmap, it will return me an image of the area? If so, then this may satisfy my need to create a drag image during drag/drop operations. My use pattern would next require me to hittest the HTMLUIControl to retrieve the clicked element. I'll raise that privately with more info in the Direct Trac Support System. Thanks.

- Randolph




Vallarasu S [Syncfusion]
Replied On June 29, 2011 05:15 AM

Hi Randolph,

Thanks for your interest in Syncfusion products.

'GDIUtils.GetTileBitmap' method will fill the given bitmap to another bitmap, target rectangle decides the size of the target resulting bitmap, the resulting bitmap will have the tiled version of the original bitmap. This is similar to what we get when BackgroundImageLayout is set to Tile in a control, and this does not have any correlation with your requirement.

I have attached a sample to demonstrate how an element under the mouse pointer can be accessed and dragged as a bitmap.

Refer the sample and let me know if this help.

Regards
Vallarasu S.




Element_Coordinates_ae4ebe65.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;