Plugin: hpwImage

For another project I started to implement an Timage component from the delphi package.


Now here is release 2.64:

hpwImage264a.zip 3025 KB


History:

Changes Release 2.64a:(20.11.2017)

hpwImage reverted back to Non-GDI, a seperate hpwImageGdi.nbp/nbr is provided with dependency to GdiPlus.dll
hpwImageGdi.nbp/nbr problem with jpg-save is fixed.


Changes Release 2.64:(18.11.2017)

Variable: [hpwImageWmfUseGdiPlus] - When set to 1 it enables antialias drawing with GdiPlus on WMF-Loading.


Changes Release 2.63:(16.09.2015)

Variable: [hpwImagePopupAutoPopup] - Allows to disable the right-click popup activation.
Action: hpwImageShowPopup - Show the popupmenu of the image.


Changes Release 2.62:(09.08.2015)

Action-Variable: [RectangleName_PickColorOnChange] - Allows an action to process the color under the pipette-cursor when moving.


Changes Release 2.61:(08.08.2015)

Action: hpwImagePickColor - Pick a color from a point from the complete desktop.
Variable: [hpwColorBoxPosLeft] - Allows to set the Position of the hpwColorBox.
Variable: [hpwColorBoxPosTop] - Allows to set the Position of the hpwColorBox.
Variable: [hpwColorCirclePosLeft] - Allows to set the Position of the hpwColorCircle.
Variable: [hpwColorCirclePosTop] - Allows to set the Position of the hpwColorCircle.


Changes Release 2.60:(25.11.2013)

Nested calls of command-wizards no longer throw an access-violation.


Changes Release 2.59:(23.11.2013)

Action: hpwImageSetActions - Can now delete Actions by setting to empty string.
Action: hpwImageGetRectArea - LeftClickUp processing is now handle before LeftClickUp-Action code


Changes Release 2.58:(23.11.2013)

Action: hpwImageFrameRect and hpwImageGetRectArea gets an additional paramter frame-width 1-5.


Changes Release 2.57:(22.11.2013)

Action: hpwImageDrawLine, hpwImageDrawLines and hpwImageRectangle gets an additional paramter pen-width.


Changes Release 2.56:(12.11.2013)

Recompiled with updated Png-Library (Fix for hpwSimpleGraph)


New upload(01.11.2013)

Plugins are now uncompressed without upx-compression.


Changes Release 2.55:(05.07.2013)

hpwScrollbar now resizes with its rectangle.


Changes Release 2.54:(27.03.2013)

Bugfix: hpwImageLoadStamp - Had a memory-leak when using TIF/STW from embedded filesystem


Changes Release 2.53:(19.03.2013)

Action: hpwImageStamp - Places a stamp by code on an image.


Changes Release 2.52:(18.03.2013)

Action: hpwImageGetBoundery - Find the rectangle-boundery of a bitmap inside a area with backgroundcolor.
Variable: [Rectanglename_StampX] stores the xpos of the color snap point.
Variable: [Rectanglename_StampY] stores the ypos of the color snap point


Changes Release 2.51:(16.03.2013)

Action: hpwImageStampUpdateBuffer- Update stamp back-buffer with current image content.
Variable: [hpwImageStampButton] allows to attach the stamp action to left,right,middle and double click.
Variable: [hpwImageStampSnapColor] is set to the snap-color
Variable: [hpwImageStampSnapDistance] is set to the distance from cursor-pos where snap color is searched.
Variable: [RectangleName_StampNoColorSnapAction] action is fired when no snap point is found.
Variable: [RectangleName_StampAction] action is fired when a stamp-event has happend.


Changes Release 2.50:(01.01.2013)

Bugfix: Forgotten active debug messagebox in resize-code removed.


Changes Release 2.49:(16.12.2012)

Bugfix: (From 2.41) hpwImageTextOutAngle bugfix for undefined text-size in command wizard on font-select-action.


Changes Release 2.48:(20.06.2012)

Bugfix: [hpwImagePrepareGetRectArea]=1 - Was limited to a fixed size. Now backbuffer are the same size as the image.


Changes Release 2.47:(19.06.2012)

Bugfix: [hpwImagePrepareGetRectArea]=1 - Was limited to a smaller size of image. Now up to 1200*770.

Variable: [hpwColorCircleCurrentColor] is set during ColorCircle
Variable: [hpwColorCircleStartColor] is set during ColorCircle-Start


Changes Release 2.46:(16.06.2012)

Bugfix: hpwImageColorCircle - Picker was not setting always right value.

Variable: [hpwColorCircleButtonTextSize] - Textsize on buttons.
Variable: [hpwColorCircleButton1Visible] - Show additional custom button 1.
Variable: [hpwColorCircleButton2Visible] - Show additional custom button 2.
Variable: [hpwColorCirclePickButtonCaption] - Set caption text of pickbutton.
Variable: [hpwColorCircleButton1Caption] - Set caption text of custom button 1.
Variable: [hpwColorCircleButton2Caption] - Set caption text of custom button 2.
Variable: [hpwColorCircleOKButtonCaption] - Set caption text of OK button.
Variable: [hpwColorCircleCancelButtonCaption] - Set caption text of Cancel button.
Variable: [hpwColorCircleButton1Action] - Set action script for custom button 1.
Variable: [hpwColorCircleButton2Action] - Set action script for custom button 2.


Changes Release 2.45:(15.06.2012)

Action: hpwImageColorCircle - Obtain a color using a custom circle color dialog box.


Changes Release 2.44:(13.06.2012)

Action: hpwImageConvToHSL - Convert a color to HSL values

Action: hpwImageDrawShadow has a new parameter 'DarkHole' to draw a gradient hole from a dark color.


Changes Release 2.43:(09.06.2012)

Action: hpwImageGetRectArea - Obtain a rect area by using a rubberband-box.
Variable: [hpwImagePrepareGetRectArea] to prepare buffer for hpwImageGetRectArea
Variable: [RectangleName_GetAreaStartX] to store coordinates from hpwImageGetRectArea.
Variable: [RectangleName_GetAreaStartY] to store coordinates from hpwImageGetRectArea.
Variable: [RectangleName_GetAreaEndX] to store coordinates from hpwImageGetRectArea.
Variable: [RectangleName_GetAreaEndY] to store coordinates from hpwImageGetRectArea.


Changes Release 2.42:(28.05.2012)

Action: hpwImageSetPopupItem - Support for a new property 'TEXT|New item text' for a popup item.


Changes Release 2.41:(17.08.2011)

hpwImageTextOut and hpwImageTextOutAngle bugfix for undefined text-size in command wizard on font-select-action.

hpwImageTextOut and hpwImageTextOutAngle now try to compensate Textsize when system is set to PixelsPerInch <> 96 (100% zoom).

Hidden variable [*/*hpwImageDPI] now contains the system DPI setting on plugin-load.


Changes Release 2.40:(30.12.2009)

[hpwImageColorDialogOptions] can have the 2 option-flags cdFullOpen and cdPreventFullOpen.

[hpwImageColorDialogCustomColors] can/does contain a list of 16 custom-colors (ColorA .. .. .. ColorP).


Changes Release 2.39:(14.12.2009)

Input color format ACI:1 .. ACI:255 now supported.

hpwImageGetPixel supports a new colorformat token 'ACI' (AutocadColorIndex) for output.


Changes Release 2.38:(04.12.2009)

Variable: [Rectanglename_FontStyle] - Stores a string containing the style-flags.

Variable: [Rectanglename_FontCharSet] - Stores a number with the charset (see CHARSET.txt)

Both variables are now supported in hpwImageTextOut and hpwImageTextOutAngle


Changes Release 2.37:(03.12.2009)

Action: hpwImageFontBox - Obtain font data using a standard Windows font dialog box.

Action: hpwImageColorBox - Obtain a color using a standard Windows color dialog box.


Changes Release 2.36:(03.10.2009)

Bugfix for hpwImageGetPixel when neobook's [WinHandle] gets > 32BIT


Changes Release 2.35:(19.08.2009)

Recompiled without Win32.Induc delphi virus


Changes Release 2.34:(31.05.2009)

Changed the used runtime-packer for a better vista and IE8-compatibility.

Action: hpwImageDrawShadow - Draws a custom shadow with a gradient.

Color value 0x..... and RGBINT...... now supported.


Changes Release 2.33:(14.2.2009)

Bugfix for stamp commands when image is not prepared for stamping (Now error and no more access violation)

More Variables for stamp calculations. Sample shows how to do stamp alignment.


Changes Release 2.32:(13.2.2009)

Action: hpwImageLoadStamp - Load a stamp from files/sources supported by the lib GraphicEx.

Action: hpwImageStampConfig - Configure the stamp-tool with grid and offsets and flags.

Variable: [hpwImagePrepareStamp] to enable stamp feature.


Changes Release 2.31:(8.2.2009)

Action: hpwImageLoadFromFileEx - Load a image from files supported by the import-library GraphicEx.

Supported formats:

TIFF images (*.tif; *.tiff)
GFI fax images (*.fax)
SGI images (*.bw, *.rgb, *.rgba, *.sgi)
Autodesk images files (*.cel; *.pic)
Truevision images (*.tga; *.vst; *.icb; *.vda; *.win)
ZSoft Paintbrush images (*.pcx, *.pcc; *.scr)
Kodak Photo-CD images (*.pcd)
Dr. Halo images (*.cut, *.pal)
CompuServe images (*.gif)
SGI Alias/Wavefront images (*.rla, *.rpf)
Standard Windows bitmap images (*.bmp, *.rle, *.dib)
Photoshop images (*.psd, *.pdd)
Paintshop Pro images (*.psp)
Portable network graphic images (*.png)

For details about GraphicEx from Mike Lischke: www.soft-gems.net

Additional supported formats:

Neosoft stamp format (*.st, *.stw)
(From the *.st format exists 2 formats. Only the newer ist supported)
(You can open the older st-file in neopaint and resave it to *.stw)

Action: hpwImageFileOpenPictureBox - Obtain a picture file name using a standard fileopen dialog box with picture preview.


Changes Release 2.30:(26.1.2009)

Action: hpwImageLoadCursorBitmap - Load the Cursor of the image from bitmap-file , Embedded and MimeStream.

Supports 5 custom slots like hpwImageLoadCursor (Cursor1/Cursor2/Cursor3/Cursor4/Cursor5)


Changes Release 2.29:(13.10.2008)

Changed compiler to delphi 7 only

Wizards now compatibel look with neobook 5.6


Changes Release 2.28:(22.7.2008)

Bugfix for rectangle-handles > 32 bit


Changes Release 2.27:(17.4.2008)

Action: hpwImageLoadCursor - Load the Cursor of the image. (Cursor1/Cursor2/Cursor3/Cursor4/Cursor5)

Change: hpwImageSetCursor - New parameters Cursor1/Cursor2/Cursor3/Cursor4/Cursor5


Changes Release 2.26:(20.1.2008)

Removed some more designtime-related code from NBR which results in a slightly smaller size.


Changes Release 2.25:(18.1.2008)

All commands wizards show the exact command in the wizards dialog caption.

All commands wizards show the command, plugin-name and the command-hint similar to neobook's native commands.

Removed some designtime-related code from NBR which results in a slightly smaller size.


Changes Release 2.24:(2.10.2007)

hpwImageActivatePopup - improved the menu-source editor with line/column detection


Changes Release 2.23:(2.10.2007)

Fix: hpwImageSetPopupItem now also works on items with subitems.


Changes Release 2.22:(28.9.2007)

Action: hpwImageActivatePopup - Activate/setup the popupmenu of the image.

Action: hpwImageSetPopupItem - Set different propertys of a popup item.

Change: hpwImageCreate gets 2 new parameters for actions for the popupmenu.


Changes Release 2.21:(24.8.2007)

Bugfix: hpwImageDrawLine/hpwImageDrawLines new dashed lines need a background color for the gaps.

Bugfix: hpwImageFrameRect did not draw when X2 < X1 or Y2 < Y1. Now it draws always.


Changes Release 2.20:(23.8.2007)

Action: hpwImageDrawLine and hpwImageDrawLines now supports line-styles.


Changes Release 2.19:(5.7.2007)

Action: hpwImageFind - Find one bitmap area inside another bitmap area.


Changes Release 2.18:(19.1.2007)

Using NB 5.5.3 new privat variable to publish the DLL-name.


Changes Release 2.17:(29.10.2006)

Added GIF support to hpwImageLoadFromFile, hpwImageScaleFromFile, hpwImageSize, hpwImageToClip and hpwImageLoadFromExe


Changes Release 2.16:(28.10.2006)

Action: hpwNViewLibImageSize - Get width and height of an imagefile with NViewLib.


Changes Release 2.15:(15.10.2006)

Bugfix for TaskBarClickAndRestoreOnTop for About-dialog and command wizards


Changes Release 2.14:(11.09.2006)

Command-wizards for hpwImageTextOutAngle and hpwImageCompare with reduced dialog height


Changes Release 2.13:(10.09.2006)

Command-wizards for all commands (36 dialogs)!


Changes Release 2.12:(18.04.2006)

Action: hpwImageToClip - Copy an image directly to clipboard. (BMP/JPG/PNG/TIF)


Changes Release 2.11:(25.03.2006)

Action: hpwImageLoadFromMimeStream - Load a image from MimeStream (BMP/JPG/PNG/CAR).
Action: hpwImageSaveToMimeStream - Save a image to MimeStream (BMP/JPG/PNG/CAR).


Changes Release 2.10:(24.03.2006)

Action: hpwImageLoadFromExe has 2 new parameters: TransparentFlag and TransparentColor
Action: hpwImageScaleFromFile has 2 new parameters: TransparentFlag and TransparentColor
Action: hpwImageCopyFromClip has 2 new parameters: TransparentFlag and TransparentColor
Action: hpwImageScaleFromClip has 2 new parameters: TransparentFlag and TransparentColor


Changes Release 2.09:(24.03.2006)

CAR-Support was broken since compiling with a newer PNG-Lib.

Action: hpwImageLoadFromFile has 2 new parameters: TransparentFlag and TransparentColor


Changes Release 2.08:(20.11.2005)

Action: hpwImageCompare - Compare 2 bitmap area from 1 or 2 images if they are equal (0/1).


Changes Release 2.07:(06.11.2005)

Bugfix Variable [RectangleName_MaxX]+[RectangleName_MaxY] was 1 pixel to big
when image was created with [hpwImageAbsoluteXSize]+[hpwImageAbsoluteYSize]

Sample pub shows mouse-move of image position (page 4).

Action: hpwImageSetActions - Set Actions for image-control.


Changes Release 2.06:(05.11.2005)

Variable [hpwImageTextSize] set to "1" disable the TextOutput of hpwImageTextOut

[RectangleName_TextHeight] contains the pixel-height of last drawn hpwImageTextOut

[RectangleName_TextWidth] contains the pixel-width of last drawn hpwImageTextOut


New Upload:

Both versions with corrected command-help-strings.


New Upload:

Both versions compiled with a newer PNG-Lib.


New Upload:

Alternative compile under delphi7 to fix a problem with JPEG-Loading.


Changes Release 2.05:(05.07:2005)

hpwImageSetDragImage - Fixed display problems of dragimages on some XP-PC.

hpwImageSetDragImage - Filename 'clipboard' gets dragimage from clipboard.

hpwImageSetDragImage - Filenames starting with '[Embedded]' gets dragimage from EXE.


Changes Release 2.04:(30.06.2005)

Action: hpwImageSetDragImage - Set DragImage for current drag-operation.


Changes Release 2.03:(30.03.2005)

BuxFix: hpwImageTurnFile's error message for target format was using extension from source format.


Changes Release 2.02:(18.03.2005)

hpwImage no more catches a tab-stop

[hpwImageAbsoluteXSize] and [hpwImageAbsoluteYSize] allow to create Images bigger than the rectangle (invisible)


Changes Release 2.01:(12.03.2005)

Action: hpwImageDragAndDrop - Configure DragAndDrop behaviour of the image.

Action: hpwImageCheckHotspot - Check move-point if valid Hotspot using a mask-image.

Action: hpwImageSetCheckDrop - Set Check-Drop parameter like mask,colorformat and backgroundcolor.

Changed: hpwImageSetCursor - A new third parameter for a cursorlist used for masked-driven cursors.

Changed: hpwImageSetHint - A new third parameter for a hintlist used for masked-driven hints.

Action: hpwImageGetColor - Get a color from a point in a image.(Rectangle,X1,Y1,format,variable).

Action: hpwImageLoadFromExe - Load a image from EXE (BMP/JPG/PNG/ICO/CAR). (NB5 only)


Changes Release 1.40:(10.12.2004)

Final Release of new direct newLISP-interface (see lispdemo.lsp)


Changes Release 1.39:(09.12.2004)

New direct newLISP-interface (see lispdemo.lsp)


Changes Release 1.38:(06.12.2004)

Bugfix: Memory leak in hpwImageDrawLines


Changes Release 1.37:(21.11.2004)

Bugfix: The plugin-hint was not taken from the new INI-file.


Changes Release 1.36:(20.11.2004)

Added hpwImage.ini in plugin-directory to be able to translate/expand plugin comments.

Bugfix: When [hpwImageBGColor] was not set, a Access Violation occured, now it defaults to clWhite.


Changes Release 1.35:(20.10.2004)

Action: hpwImageCreate has now 6 parameters. The 6.parameter is a action-string for LeftMouseButtonDown.


Changes Release 1.34:(19.10.2004)

Action: hpwScrollbarCreate Attach a scrollbar control to an existing NeoBook Rectangle object.

Action: hpwScrollbarDelete Remove an scrollbar control previously attached to a Rectangle object.

Action: hpwScrollbarSetParams Set Position,Minimum and Maximum value for the scrollbar.

Action: hpwScrollbarSmallChange Set change-amount for click on the arrow of the scrollbar.

Action: hpwScrollbarLargeChange Set change-amount for click on the scrollbar.

Action: hpwScrollbarPageSize Set page-size of the scroller of the scrollbar.


Changes Release 1.33:(17.10.2004)

Action: hpwImageSetCursor Set the Cursor-property of the image. (crDefault/crNone/crArrow/crCross/crHourGlass/crHandPoint)

Action: hpwImageSetHint Set the Hint-property of the image.


Changes Release 1.32:(16.10.2004)

Action: hpwImageSetAlign Set the Align-property of the inside image. (alClient/alNone)

Action: hpwImageSetPos Set the X-Pos/Y-Pos of the inside image relative to the rectangle.

Action: hpwImageSetSize Set the width/height of the inside image.

Action: hpwImageMove Move the inside image in the rectangle.


Changes Release 1.31:(03.07.2004)

Action: hpwImageLoadFromFile now supports CAR.

Variable: hpwCarLoadFrameCount

Variable: hpwCarLoadFrameWidth

Variable: hpwCarLoadWidth

Variable: hpwCarLoadHeight

Action: hpwImageSaveToFile now supports CAR.

Variable: hpwCarSaveFrameCount

Action: hpwImageSize now support CAR

Variable: hpwCarLoadFrameCount

Variable: hpwCarLoadFrameWidth

Variable: hpwCarLoadWidth

Variable: hpwCarLoadHeight

Action: hpwImageSize now support WMF
WMF are measured with Pixel and PictureUnits (Same variable with attached '_PU')


Changes Release 1.30:(05.06.2004)

Action: hpwImageLoadFromFile now supports ICO.

Action: hpwImageLoadFromWMF: new support WMF-vector-files with scaling on insert.


Changes Release 1.29:(27.05.2004)

Change: All command with a color parameter accept now 32Bit integer values


Changes Release 1.28:(27.01.2004)

Action: hpwImageTurnFile: Copy/convert when not 90/180/270. Target-extension now used for output-format.


Changes Release 1.27:(26.01.2004)

Action: hpwImageTurnFile: Turn a image (90/180/270) from file to a file (BMP/JPG/TIF/PNG).


Changes Release 1.26:(25.01.2004)

NViewLib.DLL is no more statical linked. So user's who need no function from it, does not need to install it.


Changes Release 1.25:(24.01.2004)

Action: hpwImageTextOut now supports antialiased text (Only on windows OS with support for this feature).

Action: hpwImageTextOutAngle now supports antialiased text (Only on windows OS with support for this feature).
New variables [hpwImageAntiAliased] for enabling antialiased text.


Changes Release 1.24:(14.12.2003)

Action: hpwImageCreate now has 5 parameter. New parameter is a action-string for mouse-over events.

New variables [Rectangelname_MoveX] and [Rectangelname_MoveY] contains the current mouse-position.


Changes Release 1.23:(07.12.2003)

Action: hpwImageDrawLines to draw a multi-segmented line.


Changes Release 1.22:(22.10.2003)

Loading with external NViewLib.DLL now sets [NViewLibXsize]+[NViewLibYsize] with imagesize


Changes Release 1.21:(15.07.2003)

Bugfix on WMNotify for NB4.11e


Changes Release 1.20:(17.03.2003)

Resizing - By making the rectangle smaller you can change the visibile area of the image.


Changes Release 1.19:(15.03.2003)

Action: hpwImageColorSwap - Swap pixels from a color to another color in a image-rectangle.

Action: hpwImageScaleFromFile - Load and scale a image from file.

Action: hpwImageScaleFromClip - Load and scale an image from clipboard.


Changes Release 1.18:(02.03.2003)

Action: hpwImageSize gives imagesize for BMP,PNG,TIF and JPG files.

Changed: hpwImageToRTF second parameter is now correctly set as a variable (with brackets!).

Changed: hpwImageGetPixel last parameter is now correctly set as a variable (with brackets!).


Changes Release 1.17:(25.02.2003)

Variable hpwImageJpgQuality allows to set JPG-Quality on saving.


Changes Release 1.16:(22.02.2003)

Added support for external NViewLib.DLL (Freeware K.Nishita.) for loading additional fileformats.
Supported graphic format: JPG, JIF, GIF, BMP, DIB, RLE, TGA, PCX.


Changes Release 1.15:(06.02.2003)

Action: hpwImageGetPixel to get a pixel's color. See sample-pub for parameter and offset.


Changes Release 1.14:(04.02.2003)

Change: All command with a color parameter accept now '$00BBGGRR' , '#RRGGBB' and '255,0,0'
which are delphi TColor, HTML color and RGB color values.


Changes Release 1.13:(02.02.2003)

BugFix: hpwImageFloodFill had influenced the speed of all other drawing commands


Changes Release 1.12:(31.01.2003)

Action: hpwImageFloodFill to fill from a X/Y with a color.


Changes Release 1.11:(13.01.2003)

Action: hpwImageDelete no more needed, at Shutdown all images are removed.


Changes Release 1.10:(02.11.2002)

Action: hpwImageSaveToFile now supports PNG.

Action: hpwImageLoadFromFile now supports PNG.


Changes Release 1.09:(29.10.2002)

Action: hpwImageSaveToFile now supports TIF.

Action: hpwImageLoadFromFile now supports TIF.


Changes Release 1.08:(27.10.2002)

Action: hpwImageSaveToFile now supports BMP and JPG.

Action: hpwImageLoadFromFile now supports BMP and JPG.


Changes Release 1.07:(26.10.2002)

Action: hpwImageToRTF send an area from the image to an RTF-variable.


Changes Release 1.06:(22.10.2002)

Action: hpwImageTextOutAngle has coordinates, fontname, size, colors;angle to draw a textstring to the image.

Variables: [hpwImageTransparent] to store the Transparent flag for text.


Changes Release 1.05:(20.10.2002)

Action: hpwImageTextOut has coordinates, fontname, size, colors to draw a textstring to the image.

Variables: [Rectanglename_PenPosX]+[Rectanglename_PenPosY] to store the last PenPos coordinate.


Changes Release 1.04:(19.10.2002)

Changed action: hpwImageSaveToFile now has coordinates to save a rectangle from the image.

Changed action: hpwImageLoadFromFile now has coordinates to load the bitmap to a coordinate.

New action: hpwImageCopyToClip has coordinates to copy a rectangle from the image to clipboard.

New action: hpwImageCopyFromClip has coordinates to copy a bitmap to a coordinate from the clipboard.


Changes Release 1.03:(16.10.2002)

Bugfix: hpwImageLoadFromFile had influenced the speed of the other drawing commands.


Changes Release 1.02:(16.10.2002)

Action: hpwImagePixels to draw a pixel.

Action: hpwImageSaveToFile to save a bitmap to a file.

Action: hpwImageLoadFromFile to load a bitmap from a file.


Changes Release 1.01:(15.10.2002)

Action: hpwImageRectangle to draw a filled rectangle with outline.

Action: hpwImageFrameRect to draw a hollow rectangle.

Variable: Rectanglename_MaxX + Rectanglename_MaxY for max.dimensions of the image


Initial Release 1.0:(14.10.2002)

Action: hpwImageCreate to create a Image-Bitmap.

Action: hpwImageDelete to remove a Image-Bitmap.

Action: hpwImageFillRect to draw a filled rectangle.

Action: hpwImageDrawLine to draw a line.

Supported mouse clicks: Left,Middle,Right