Java acxImage V 2.51

INDEX



News V 2.51
VERSION 2.51
  • Some changes for aDraw V 2
  • ...
VERSION 2.05
  • Some changes for aDraw
  • add line size
  • add freehand command
  • ...
Return



Description
acxImage is an ASP component to buil dynamicly an image on the server. This component is write in java and Run on IIS or PWS.
Return



Enregistrement
acxImage comonent is FreeWare for non commercial sites.
For personal use, please add a link on your site back to my Home Page (http://www.javaside.com/) and send me the URL where you wish to place the acxImage component.
For professional / commercial use, you will need to obtain a "professional registration". With this registration you can use acxImage with no reference to me and I will send you the complete acxImage source code.
If you want to use acxImage in another application, then you must obtain a "professionnal registration".
For more information about "Professional registration" : R. BERTHOU.

Return



ASP Source
<% 
	' Create component
	Set h = Server.CreateObject("javaside.Rbl.acxImage") 

	' Initialisation et definition de la taille de l image
	h.init 350, 280
	h.newImage()

	' dessin
	h.setColor 255, 255, 20 
	h.setFont "Verdana", 1, 24
	h.fillRect 0, 0, 350, 280
	h.setColor 255, 255, 255
	h.fillRect 25, 100, 50, 80
	h.setColor 0
	h.drawString "Bonjour Raymond...", 25, 120
	' fin des ordres de dessin

	' On construit l image
	h.build()

	' on genere l image au format gif
	img = h.getArray(0)

	' ---- Response format -----------
	Response.Expires = 0 
	Response.Buffer = TRUE
	Response.Clear
	Response.contenttype = "image/gif"
	Response.BinaryWrite img

	Response.End
	' ----- End Response -------------

	h.clear()
	Set h = nothing 
%>
Return



Fonctions
More informations about there functions
FunctionDescription
init(int w, int h) action : init image and size definition
newImage() action : init image (clear all)
loadImage(String s, int Id) action : read external image
build() action : build image
readFile(String f) action : read external file to get draw command
readData(String f) action : init and read data in a String to get draw command (for aDraw applet)
addData(String data) read data in a String (for aDraw applet).
getArray(int i) action : get Image in bytes array
saveAs(String s) action : Save image
clear() action : free resources
setColor(int i) action : select color
setColor(int r, int g, int b) action : select color
setFont(String face, int style, int size) action : select font
drawLine(int x, int y, int x2, int y2) action : Draw line
drawLine(int sz, int x, int y, int x2, int y2) draw line with sz size
drawString(String s, int x, int y) action : Draw String
drawRect(int x, int y, int w, int h) action : Draw rectangle empty
fillRect(int x, int y, int w, int h) action : Draw rectangle filled
draw3DRect(int x, int y, int w, int h, boolean b) action : Draw 3D rectangle empty
fill3DRect(int x, int y, int w, int h, boolean b) action : Draw 3D rectangle filled
drawRoundRect(int x, int y, int w, int h, int r1, int r2) action : Draw rounded rectangle empty
fillRoundRect(int x, int y, int w, int h, int r1, int r2) action : Draw rectangle bord arrondi filled
drawOval(int x, int y, int w, int h) action : Draw oval empty
fillOval(int x, int y, int w, int h) action : Draw oval filled
drawImage(int iId, int x, int y) action : Draw a loaded image
drawImage(int iId, int x, int y, int w, int h) action : Draw a loaded image
drawArc(int x, int y, int w, int h, int r1, int r2) action : Draw arc empty
fillArc(int x, int y, int w, int h, int r1, int r2) action : Draw arc filled
Return



File Format
With this file you can define some or complete draw commande in external data file.
ColumNameTypeDescription
file.txt (List data file) tChart2
1iIdintcommande Id
  • drawRect = 1
  • draw3DRect = 2
  • drawRoundRect = 3
  • drawOval = 4
  • drawArc = 5
  • fillRect = 6
  • fill3DRect = 7
  • fillRoundRect = 8
  • fillOval = 9
  • fillArc = 10
  • drawString = 20
  • drawLine = 21
  • drawImage = 22
  • drawImagePart = 23
  • freehand = 24
  • loadImage = 30
  • setFont = 31
  • setColor = 32
2..nParametersint ou Stringcommand parameters (";" sepparator)
Sample
// setColor Color(0xFFFFFF)
32 ; -1 ;
6  ; 0 ; 0 ; 600 ; 400 ;
// setColor Color(0x0000FF)
32 ; 255 ;
6  ; 100 ; 10 ; 60 ; 100 ;
4  ; 50 ; 100 ; 100 ; 150 ;
32 ; -255 ;
6  ; 10 ; 100 ; 80 ; 150 ;
32 ; 0 ;
20 ; Test Rbl ; 20 ; 50 ;
20 ; Ligne 2  ; 20 ; 150 ;
31 ; Arial ; 0 ; 15 ;
20 ; Arial 15 plain  ; 220 ; 50 ;
32 ; 22554 ;
31 ; Times ; 2 ; 12  ;
20 ; Times 12 italic ;  220 ; 180 ;
22 ; 0 ; 50 ; 120 ; 
Sample acxImage.txt
Return



Historique
In construction...

1.00Creation...

Return



Install
    To install this component in your server you must :
    • Download this
    • Use Javareg.exe to add registry definitions.
    • Put component in c:\winnt\java\trustlib or c:\windows\java\trustlib
    • Sample script reg.bat to do this
      ; Javareg acxImage in package Rbl
         javareg /register /class:javaside.Rbl.acxImage /progid:javaside.Rbl.acxImage
      ; build Rbl directory
      ; change c:\windows with your directory (c:\winnt or other)
         mkdir c:\Windows\Java\TrustLib\javaside
         mkdir c:\Windows\Java\TrustLib\javaside\Rbl
      ; copy *.class to Rbl directory
         copy *.class c:\Windows\Java\TrustLib\javaside\Rbl
Return



Download files
acxImage English acxImage_us.zip (81 KB)      (backup)
acxImage Francais acxImage_fr.zip (81 KB)      (backup)

Copyright © 1996..2002,
R. BERTHOU. Tous droits réservés.
Dernière modification le 09 Aout 2002 09H26