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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GDIUtils.GetTileBitmap Method

Thread ID:





99990 Jun 24,2011 02:18 PM UTC Jun 29,2011 09:15 AM UTC WinForms 2
Tags: HTMLUIControl
Randolph Webb
Asked On June 24, 2011 02:18 PM UTC

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 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

Vallarasu S [Syncfusion]
Replied On 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.

Vallarasu S.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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