Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Code Samples & Tips > Additional Libraries
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.


ImageLibEx library


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-20-2008, 12:56 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,359
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default ImageLibEx library

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.
Attached Files
File Type: zip ImageLibEx2.1.zip (231.6 KB, 73 views)

Last edited by agraham : 02-06-2010 at 10:48 AM.
Reply With Quote
  #2 (permalink)  
Old 10-20-2008, 02:00 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 4,534
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

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
Reply With Quote
  #3 (permalink)  
Old 10-23-2008, 08:14 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Switzerland
Posts: 1,577
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hi Andrew,

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.
__________________
Klaus
Switzerland

Last edited by klaus : 01-06-2009 at 08:12 PM.
Reply With Quote
  #4 (permalink)  
Old 10-23-2008, 09:20 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,359
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by klaus View Post
I found two typos in the help file.
Thanks, I've corrected them ready for the next version.
Reply With Quote
  #5 (permalink)  
Old 10-23-2008, 02:43 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 566
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Agraham
Thanks for this library

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
Reply With Quote
  #6 (permalink)  
Old 10-23-2008, 03:01 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,359
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by derez View Post
in the help file:
DrawLines (pen As Pen, x1 As Int32, xy(n,2))
Sorry, that's a cut and paste error in the help, the x1 shouldn't be there. Look at lines 126 & 127 in the Main.DrawLine Sub for an example.
Code:
	Points() = Array ( (10, 120), (200, 120), (200, 200), (10, 200))
	BackDrawerEx.DrawLines(PenEx.Value, Points())
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

DrawLine(PenEx.Value, points(2,0), point(2,1), points(7,0), point7,1))

Last edited by agraham : 10-23-2008 at 03:11 PM.
Reply With Quote
  #7 (permalink)  
Old 10-23-2008, 04:22 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 566
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

OK, I see the problem now.

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
Reply With Quote
  #8 (permalink)  
Old 10-23-2008, 04:38 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,359
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Why not?
Code:
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())
...
Reply With Quote
  #9 (permalink)  
Old 10-23-2008, 05:23 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 566
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

I get this
Attached Images
File Type: jpg error.jpg (27.2 KB, 29 views)
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #10 (permalink)  
Old 10-23-2008, 05:30 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,359
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

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())
...
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging Outlook library and Phone library Erel Official Updates 4 01-01-2010 09:18 AM
Door library (Beta) - Special library Erel Official Updates 52 12-08-2008 05:03 PM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 07:46 PM
ImageLibEx? agraham Basic4ppc Wishlist 2 11-05-2007 01:15 PM
ImageLibeX Error XerVision Questions & Help Needed 8 08-27-2007 06:14 PM


All times are GMT. The time now is 04:28 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0