GdPicture.NET Reference Guide
DrawLineTextureFromGdPictureImage Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : DrawLineTextureFromGdPictureImage Method
GdPicture Image Identifier.
GdPicture Image Identifier. Source image used for the texture.
Specifies the x-coordinate of the starting point of the line.
Specifies the y-coordinate of the starting point of the line.
Specifies the x-coordinate of the ending point of the line.
Specifies the y-coordinate of the ending point of the line.
The width, in pixel, of the pen used to draw the line.
Set to True to apply the Antialiasing algorithm else False.
Draws a textured line on a GdPicture image using a texture from a GdPicture Image.
Syntax
'Declaration
 
Public Function DrawLineTextureFromGdPictureImage( _
   ByVal ImageID As Integer, _
   ByVal ImageTexture As Integer, _
   ByVal SrcLeft As Integer, _
   ByVal SrcTop As Integer, _
   ByVal DstLeft As Integer, _
   ByVal DstTop As Integer, _
   ByVal PenWidth As Integer, _
   ByVal AntiAlias As Boolean _
) As GdPictureStatus
public GdPictureStatus DrawLineTextureFromGdPictureImage( 
   int ImageID,
   int ImageTexture,
   int SrcLeft,
   int SrcTop,
   int DstLeft,
   int DstTop,
   int PenWidth,
   bool AntiAlias
)
public function DrawLineTextureFromGdPictureImage( 
   ImageID : int,
   ImageTexture : int,
   SrcLeft : int,
   SrcTop : int,
   DstLeft : int,
   DstTop : int,
   PenWidth : int,
   AntiAlias : boolean
) : GdPictureStatus;
public: GdPictureStatus DrawLineTextureFromGdPictureImage( 
   int ImageID,
   int ImageTexture,
   int SrcLeft,
   int SrcTop,
   int DstLeft,
   int DstTop,
   int PenWidth,
   bool AntiAlias
) 
public:
GdPictureStatus DrawLineTextureFromGdPictureImage( 
   int ImageID,
   int ImageTexture,
   int SrcLeft,
   int SrcTop,
   int DstLeft,
   int DstTop,
   int PenWidth,
   bool AntiAlias
) 

Parameters

ImageID
GdPicture Image Identifier.
ImageTexture
GdPicture Image Identifier. Source image used for the texture.
SrcLeft
Specifies the x-coordinate of the starting point of the line.
SrcTop
Specifies the y-coordinate of the starting point of the line.
DstLeft
Specifies the x-coordinate of the ending point of the line.
DstTop
Specifies the y-coordinate of the ending point of the line.
PenWidth
The width, in pixel, of the pen used to draw the line.
AntiAlias
Set to True to apply the Antialiasing algorithm else False.

Return Value

A member of the GdPictureStatus enumeration.
Remarks
Supported formats are listed here: http://www.gdpicture.com/solutions/supported-formats/.
Example
Drawing a Line on the image with Texture from a path.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   Dim TextureImage As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("texture.tif")
   If TextureImage <> 0 Then
      oGdPictureImaging.DrawLineTextureFromGdPictureImage(ImageID, TextureImage, 50, 10, 250, 200, 10, True )
      oGdPictureImaging.SaveAsPNG(ImageID, "output.png")
      oGdPictureImaging.ReleaseGdPictureImage(TextureImage)
   Else
      MessageBox.Show("Error: Cannot load texture file:" + oGdPictureImaging.GetStat().ToString())
   End If
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members