This library is a replacement for ImageLib upon which it was modelled using the ImageLib source (with Erels prior agreement) as a start - it's a bit different now
Check out the demo, particularly on the desktop, to see what can now be done. Two libraries, for desktop and device, source for merging, help and a demo are in the zip. Both desktop and device require .NET 2.0.
EDIT :- Version 1.1 posted with new method BitmapEx.Rotate which rotates a bitmap an arbitrary number of degrees. Note that if you want to merge the source for a device app you need to put a SIP(False) statement in your App_Start if you do not already use SIP elsewhere. This forces the Basic4ppc to reference a .NET assembly that it would not otherwise do and that is required for merging. This need will be removed with the next version of Basic4ppc.
EDIT :- Version 1.2 posted with improvements. See post #31 for details.
EDIT :- Version 1.3 posted with bitmap alpha blending. See post #50 for details.
EDIT :- Version 1.4 posted with minor tweak to BitmapEx.Zoom memory management and BitmapEx.Zoom documented in the help. There is (at least) one error in the help. See post #67.
EDIT :- Version 1.5 posted. See post #85 for details.
EDIT :- Version 1.6 posted. See post #103 for details.
EDIT :- Version 1.7 posted. See post #105 for details.
EDIT :- Version 1.8 posted. See post #106 for details.
EDIT :- Version 1.9 posted. See post #115 for details.
EDIT :- Version 2.0 posted. See post #136 for details.
EDIT :- Version 2.1 posted. See post #142 for details.
EDIT :- Version 2.2 posted. See post #177 for details.
Looks great!
Small tip for new users:
The simplest way to install it is to copy the following files to Basic4ppc libraries folder:
ImageLibExDevice.dll (device library)
ImageLibExDesktop.dll (desktop library)
ImageLibExDevice.cs (required for merging)
ImageLibExDesktop.cs (required for merging)
ImageLibEx.chm (help file)
The libraries folder is usually located under:
C:\Program Files\Anywhere Software\Basic4ppc Desktop\Libraries
I just discovered your new ImageLibEx, it is pretty good news. I have not yet 'played' with it, but will do it quite soon. It combines the functionalities of the form's drawing functions and the ImageLib ones and adds new welcomed functions in ONE library. That's great !
I found two typos in the help file.
- In the list of objects in the left list Rectangle should be RectangleEx
- In the drawer, the function
RefreshForm2 (form As Form, x As Int32, y As Int32, width As Int32, height As Int32)
should be
RefreshForm2 (form As Form, rect As Rectangle)
Best regards and congratulations for this great job.
I'm trying to use the drawlines and do not understand it, can you please check that the definition is correct :
in the help file:
DrawLines (pen As Pen, x1 As Int32, xy(n,2))
in the context menu its without the x1
anyway, I have two dimensional array name routepoints, I want to draw connected line from point 2 to 7 , how should i write it ? (the points are already defined in the array)
DrawLines (pen.value, routepoints??????) ?
Thanks
__________________
David Erez
Ramat Hasharon, Israel
EDIT :- I may not have understood your question correctly. DrawLines connects all the points in the array by drawing lines between them in sequence. Draw Polygon is the same except it also joins the first and last point together to close the polygon. To draw from point 2 diectly to point 7 do something like
I can start it from the first point but I don't know how many points I have, and I can assign the value only inside a loop, not as an array declaration.
I don't thing that array list can accept two dimensions ...
The code goes like this:
...
For i = a To b + 1
Point(i).x = (...some calculation)
routepoints(i-a,0) = Point(i).x ' so it starts from 0
Point(i).y = (...some calculation)
routepoints(i-a,1) = Point(i).y
Next
drawer.(pen.Value, routePoints())
...
In polygon Erel used two arraylists to define the coordinates:
AddArraylist("alX")
AddArraylist("alY")
any suggestion ?
Thanks
__________________
David Erez
Ramat Hasharon, Israel
Dim routepoints(0,0) ' in Globals ... ... Dim routepoints (b-a+2, 2) For i = a To b + 1 Point(i).x = (...some calculation) routepoints(i-a,0) = Point(i).x ' so it starts from 0 Point(i).y = (...some calculation) routepoints(i-a,1) = Point(i).y Next drawer.(pen.Value, routePoints()) ...
Ooops! The array should be Int32. I don't know why it not being Int32 might cause that error, I would expect a type error. If it persists post the bit of code that causes it.
Code:
Dim routepoints(0,0) As Int32 ' in Globals ... ... Dim routepoints (b-a+2, 2) As Int32 For i = a To b + 1 Point(i).x = (...some calculation) routepoints(i-a,0) = Point(i).x ' so it starts from 0 Point(i).y = (...some calculation) routepoints(i-a,1) = Point(i).y Next drawer.(pen.Value, routePoints()) ...