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. Image for the cookie policy date

GDIUtils.GetTileBitmap Method

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?



2 Replies

RW Randolph Webb June 25, 2011 01:00 AM UTC

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





VS Vallarasu S Syncfusion Team June 29, 2011 09:15 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon