Using Win32 functions in Visual FoxPro Image Gallery
GDI+ Graphics
..msdn
GdipCreateFromHDC
GdipCreateFromHDC2
GdipCreateFromHWND
GdipDeleteGraphics
GdipDrawImageI
GdipDrawImageRectI
GdipDrawImageRectRectI
GdipDrawLineI
GdipDrawPieI
GdipDrawRectangle
GdipFillPieI
GdipFillRectangle
GdipGetDC
GdipGetDpiX
GdipGetDpiY
GdipGetPageScale
GdipGetPageUnit
GdipGetSmoothingMode
GdipReleaseDC
GdipResetWorldTransform
GdipRotateWorldTransform
GdipSetClipRectI
GdipSetPageScale
GdipSetPageUnit
GdipSetSmoothingMode
GdipSetTextRenderingHint
GdipSetWorldTransform
GdipTranslateWorldTransform
Code examples:
GDI+: Color Transparency
GdipDrawImageRectRectI
..msdn    Add comment     W32 Constants      Translate this page
Draws an image optionally using a ImageAttributes object.
Code examples:
GDI+: Color Transparency
Declaration:
GpStatus WINGDIPAPI GdipDrawImageRectRectI(
    GpGraphics *graphics, 
    GpImage *image, 
    INT dstx, INT dsty,
    INT dstwidth, INT dstheight, 
    INT srcx, INT srcy,
    INT srcwidth, INT srcheight, 
    GpUnit srcUnit, 
    GDIPCONST GpImageAttributes* imageAttributes, 
    DrawImageAbort callback, 
    VOID * callbackData)
FoxPro declaration:
DECLARE INTEGER GdipDrawImageRectRectI IN gdiplus;
    INTEGER graphics,;
    INTEGER gdiimage,;
    INTEGER dstx,;
    INTEGER dsty,;
    INTEGER dstwidth,;
    INTEGER dstheight,;
    INTEGER srcx,;
    INTEGER srcy,;
    INTEGER srcwidth,;
    INTEGER srcheight,;
    INTEGER srcUnit,;
    INTEGER imageAttributes,;
    INTEGER callback,;
    INTEGER callbackData
Parameters:
graphics
[in] Handle of a Graphics object.

image
[in] Handle of a Image object that specifies the source image.

dstx
[in] Specifies the x-coordinate of the upper-left corner of the destination drawing area.

dsty
[in] Specifies the y-coordinate of the upper-left corner of the destination drawing area.

dstwidth
[in] Specifies the width of the portion of the destination drawing area.

dstheight
[in] Specifies the height of the portion of the destination drawing area.

srcx
[in] Specifies the x-coordinate of the upper-left corner of the portion of the source image to be drawn.

srcy
[in] Specifies the y-coordinate of the upper-left corner of the portion of the source image to be drawn.

srcwidth
[in] Specifies the width of the portion of the source image to be drawn.

srcheight
[in] Specifies the height of the portion of the source image to be drawn.

srcUnit
[in] Element of the Unit enumeration that specifies the unit of measure for the image.

imageAttributes
[in] Handle to a ImageAttributes object. Can be NULL.

callback
[in] Pointer to a callback procedure used to cancel the drawing in progress. Can be NULL.

callbackData
[in] Pointer to additional data used by the method specified by the callback parameter. Can be NULL.
Return value:
Returns GpStatus value, 0 means success.
Usage:
WITH oBitmap.graphics
    .FillRectangle(oBrush, 0,0,;
    oBitmap.imgwidth,oBitmap.imgheight)

    = GdipDrawImageRectRectI(.graphics, oImage1.himage,;
        10, 10, oImage1.imgwidth,oImage1.imgheight,;
        0, 0, oImage1.imgwidth,oImage1.imgheight,;
        2, hImgAttr, 0, 0)
ENDWITH
My comment:
This function can be used for drawing images with colors or color ranges made transparent.

See also: GdipDrawImageRectI, AlphaBlend
Word Index links for the GdipDrawImageRectRectI :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2009-01-16 18:26:13
Modified: 2009-01-17 21:17:12
Visited in last 7 days: 6
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2014 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.68), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (23.22.194.120)
2 day(s)Function: 'JetCreateDatabase'
Function group: 'Extensible Storage Engine (ESE, Jet Blue)'
 Example: 'Subclassing CommandButton control to create BackColor property'
 Function: 'waveOutSetVolume'
 Function: 'MAPISendDocuments'
Function group: 'Simple MAPI'
 Function: 'NetScheduleJobDel'
Function group: 'Network Management'
 Function: 'AVIStreamLength'
Function group: 'Windows Multimedia'
Google
Advertise here!