History of Changes
- New: driver SVG.
- New: base driver GDK.
- New: function
CanvasYAxisMode to control the Y axis orientation.
- New: functions
wdCanvasSetTransform, wdCanvasGetTransform,
wdCanvasTranslate and wdCanvasScale, to
better control the WD transformation.
- New:
"PDFLIBVERSION",
"SUBJECT","TITLE","CREATOR","AUTHOR","KEYWORDS" attributes for the PDF
driver.
- New:
"FREETYPEVERSION" attribute for the Simulation base driver.
- New:
"PRINTERNAME" attribute for the CD_PRINTER base driver.
- Changed:
Freetype updated to version 2.3.11.
- Changed:
PDFLib Lite updated to version 7.0.4p4.
- Changed:
return value to boolean of CanvasIsPointInRegion and
cd.UseContextPlus in Lua.
- Changed:
added missing support for alpha channel in image:cdCreateCanvas,
cd:imImageCreate, image:cdCreateBitmap and
image:cdInitBitmap in cdluaim binding.
- Changed:
ANTIALIAS attribute is now respected also by CanvasText in
the IMAGERGB driver.
- Changed:
WriteMode=XOR is ignored if alpha transparency is used in the IMAGERGB
driver.
- Fixed: indexing of
cdImageRGB, cdImageRGBA and cdBitmap
objects in Lua.
- Fixed: CanvasText
for WD when using text with multiple lines.
- Fixed: compositing in the IMAGERGB
driver when
canvas has a semi-transparent alpha channel and a color with semi transparent alpha
are used.
- Fixed: polygon filling in the IMAGERGB
driver when the segments contain horizontal lines.
- Fixed: line style background not
transparent in the IMAGERGB driver.
- Fixed: CanvasClear method was affected by
CanvasWriteMode in the X11 base driver.
- Fixed: invalid memory access at
CanvasFont in the PICTURE driver.
- Fixed: improved support for line
endings at cdPlay in the METAFILE driver.
- Fixed: text alignment in the Windows
base driver when WriteMode=XOR.
- New: functions
CanvasGetVectorTextBox, CanvasGetVectorFontSize and
CanvasVectorFontSize.
- Changed:
the functions CanvasVectorText, CanvasText
and CanvasGetTextSize now supports line breaks using '\n'.
CanvasMultiLineVectorText is now deprecated but kept for
compatibility.
IMPORTANT - VectorTextSize now
uses the full line size.
- Changed:
CD_DBUFFER now activates the buffered canvas before creating the image
canvas. If size is 0 then uses 1 and avoid to fail during creation.
- Changed:
removed "lua5.1.so" dependency in UNIX.
- Fixed: CanvasText
for CD_IMAGERGB driver when the foreground color has alpha.
- Fixed: CDLua binding functions
canvas:foreground, canvas:setforeground, canvas:background and
canvas:setbackground. Color was being checked from the wrong position in the
stack. They were reporting and invalid color when being used.
- Fixed: CDLua binding functions
canvas:foreground and canvas:background when using cd.QUERY are value.
- New: CD_DEBUG driver.
- New: the "imlua_cd" library moved
from IM to CD under the name "cdluaim". Only the initialization function
name is changed.
- New: cdluacontextplus library so the
"ContextPlus" base drivers (GDI+ and XRender) can be dinamically loaded
using require.
- Changed:
IMPORTANT - the "cdiup" and "cdluaiup"
libraries moved from CD to IUP under the name "iupcd" and "iupluacd". But
headers and documentation remains on the CD package. Function names were NOT
changed. This change eliminates a cross-dependency that IUP and CD had, now
only IUP depends on CD.
- Changed:
IMPORTANT - renamed "cdgliplus"
and "cdxrender" libraries to "cdcontextplus".
- Changed:
IMPORTANT - removed the FreeType
library files from the main library. They now are available as an additional
library that can be replaced by other FreeType distributions. You should now
link with the "freetype6" library in Windows and with the "freetype" library
in UNIX (if not using GTK, freetype is already included in GTK). This change will
avoid conflicts when using CD and GTK.
- Changed:
IMPORTANT - removed the PDFLib
library files from the cdpdf library. They now are available as an
additional library that can be replaced by other PDFLib distributions. You
should now link with the "pdflib" library.
- Changed:
IMPORTANT - the support services
(Downloads, Mailing List and CVS) moved from LuaForge to SourceForge.
- Changed:
Makefiles for UNIX now uses a compact version of Tecmake that does not need
any installation, just type "make".
- Changed: All dll8 and dll9 DLLs now
have a Manifest file that specifies the correct MSVCR*.DLL.
- Changed: improved CDLua parameter
checking and error report.
- Changed: improved compatibility for
font names in X and Win32.
- Changed:
Copyright notice modified to reflect the registration at INPI (National
Institute of Intellectual Property in Brazil). License continues under the
same terms.
- Changed:
improved pattern and stipple resize in wdCanvasPattern and
wdCanvasStipple.
- Changed:
pattern creation in Win32 to a more faster method.
- Changed:
optimized font search in X-Windows base driver for size variations.
- Changed:
the number of bits per pixel returned by the CD_PRINTER driver when the
printer is a PDF Writer was 1, now we add a workaround to return 24.
- Changed:
improved the color convertion when drawing a RGB image in a CD_PRINTER
canvas with 1 bpp (usually a laser printer).
- Changed: (UNDONE from 5.0) in Lua
canvases are NOT
garbage collected anymore. Since there can be different Lua canvases pointing
to the same canvas.
- Changed: font map in simulation
driver is not case sensitive anymore.
- Changed: premake files are used now
only internally and were removed from the distribution.
- Fixed: added missing
CD_NO_OLD_INTERFACE definition on Linux makefiles.
- Fixed: attributes not being
preserved after changing clipping or adding a new page in CD_PDF.
- Fixed: polygon clipping in
CD_IMAGERGB driver when polygon is larger than the canvas.
- Fixed: cdCanvasVertex
when adding two reference points with the same coordinates in a bezier.
- Fixed: client image zoom in
CD_IMAGERGB driver.
- Fixed: text draw position and
gettextsize in Xrender base driver.
- Fixed: double buffer driver invalid
memory access when using the Xrender base driver.
Version 5.0 (26/Nov/2007)
- New: attributes "OPAQUE", "PATTERN"
and "PDF" in the CD_PDF driver.
- New: XRender base driver.
- Changed: PDF Lite library updated to
version "7.0.2".
- Changed: FreeType library updated to
version "2.3.5".
- Changed: now using "(char*)CD_QUERY"
as the parameter in cdCanvasNativeFont, it returns the current selected font in
the common format definition.
- Changed: avoid setting X-Windows color
background when calling cdCanvasClear for NativeWindow driver. Now all
X-Windows drivers will use only XFillRectangle.
- Changed: in Lua canvases are now
garbage collected.
- Changed: metatable names in Lua are
now the same as the C struct names.
- Fixed: function cdlua_checkcanvas that
affects the creation of the cd.DBUFFER canvas. Thanks to Martin Saerbeck.
- Fixed: vertical text alignment in PDF
and PS
drivers.
- Fixed: ascent and descent font
dimensions in PDF driver.
- Fixed: check for mark size and font
size when given size is 0.
Version 5.0 RC2 (09/Apr/2007)
- New: function cdCanvasInvertYAxis that
will invert the given y coordinate even if the canvas is not internally
inverted.
- Changed: PDF Lite library updated to
version "7.0.0p3".
- Changed: FreeType library updated to
version "2.2.1".
- Changed: In the new API
cdCanvasFont you can specify partial parameters using NULL, -1 and 0
for typeface, style and size. When these parameters are specified the current
font parameter is used. For example, cdCanvasFont(NULL, -1, 10) will only
change the font size.
Version 5.0 RC1 (08/Mar/2007)
- New: attribute HATCHBOXSIZE in CD_PDF
driver, to control the hatch spacing.
- New: attribute ADDFONTMAP in
simulation base driver to accept a map between a font name and a font file
name.
- New: Pango Font Description string is
now accepted in NativeFont and replace the previous CD format is most
drivers.
INCOMPATIBILITY -
If style is not used, most drivers had a format compatible with the new
format. But please check your NativeFont usage. The IUP
format is still supported.
- New: API using canvas as a parameter.
Old API still exists. Library is backward compatible with previous versions,
but the documentation shows only the new names.
The new functions add a "Canvas" to the function prefix, for ex: the
cdLine equivalent is cdCanvasLine. For these
functions cdActivate is not required. But
cdCanvasActivate exists for special cases where the canvas must be
updated if an external factor was changed, like a window resize.
To facilitate the migration to the new API use the definition CD_NO_OLD_INTERFACE
to exclude the old API definitions and check if you are using only the new
functions.
- New: support for primitives using
"double" floating point precision and not related to WC functions.
- New: "cd_canvas.hpp" header file which
defines a C++ class cdCanvasC that wraps the cdCanvas structure API.
- New: ROTATE attribute in CD_PDF
driver.
- New: binding Lua of the CD_PDF driver.
- New: support for alpha channel in
CD_IMAGERGB driver. Also support for alpha in color coding in the CD_IMAGERGB
driver primitives.
- New: attribute ANTIALIAS in the
CD_IMAGERGB driver. Text is always antialiased as before.
- New: implemented Chord primitive in
simulation base
driver.
- New: implemented CD_WINDING fill mode
in the simulation base driver.
- New: implemented complex clipping
regions in CD_IMAGERGB driver. Fixed polygon clipping and other clipping
errors in the CD_IMAGERGB driver.
- New: driver CD_DBUFFERRGB that uses
the CD_IMAGERGB driver for double buffer, and can be a double buffer for any
other driver (CD_DBUFFER works only for Window based drivers).
- New: CD_PICTURE driver to store
primitives and attributes in memory that can be played and resized in any
other driver.
- New: functions to set color foreground
and background without query support (cdCanvasSetForeground and
cdCanvasSetBackground). CD_QUERY conflicts with color RGBA=(255,255,255,255)
(full transparent white).
- New: support for generic canvas
transformations using Transform, TransformTranslate,
TransformRotate and TransformScale functions.
- New: attribute "GDI+" for all GDI+
based drivers that returns "1". So it can be detected if the driver uses the
GDI+ base driver.
- Changed:
INCOMPATIBILITY - removed
clipping simulation from the simulation base driver. It is not possible
anymore to simulate clipping, only primitives can be simulated.
- Changed: canvas internal pointer allocation so it can be checked for valid canvas in
all external API function calls.
- Changed: NativeFont("-d") to set also the foreground color from the color in the dialog, and
initialize the font in the dialog with the current selected font.
- Changed: In the new API
cdCanvasFont changed the typeface parameter type from a small set of
integer values to a more flexible string.
- Changed: all accented characters are
now available in the default vector text font.
- Changed: all functions in the API now
use "const" when applicable.
- Changed: server image defintion from
"void*" to "cdImage*". This will affect C++ applications that must update
their code.
- Changed: removed cdGetClipPoly
and wdGetClipPoly functions.
- Changed: UpdateYAxis
now also returns the changed value.
- Changed:
INCOMPATIBILITY - cdCallback
definition used in RegisterCallback, called from Play. Replaced the "cdContext*" by a "cdCanvas*".
If you do not use the pointer it can be simply ignored.
- Changed: WC functions now are only
client functions of the CD API.
- Changed: removed old support for
Windows 9x.
- Changed: removed the cdInitGdiPlusIUP function and the "cdiupgdiplus"
library. They are not necessary anymore. Althougth the CD_IUP driver still
works with GDI+ support.
- Changed: improved speed and precision
of the bezier polygon of the simulation base driver.
- Changed: renamed distribution folder
name from "cd/data" to "cd/etc".
- Changed: CD Lua for Lua 3 library name
changed to include "3" as a suffix.
- Fixed: conversion from ANSI to ASCII
in vector text fonts.
- Fixed: Sector primitive in simulation
base
driver.
- Fixed: deactivation of internal canvas in Double Buffer driver over a Native Windows driver for Win32.
- Fixed: EPS compatibility in PostScript driver.
- Fixed: the default values in cdCreateCanvas for CD_DGN, CD_DXF and CD_CGM.
- Fixed: Play for CD_EMF when data contains poly-polygons or poly-polylines.
- Fixed: LineWidth in
WC when updating the
size in pixels.
- Fixed: TextSize and
FontDim in driver DXF.
- Fixed: Font in the
X-Windows base driver, size parameter was incorrectly passed to the X-Windows.
WARNING: the result font
will have a size different than previous CD versions in X-Windows.
- Fixed: Flush in
CD_DBUFFER driver, it was affected by the write mode state of the
buffered canvas.
- Fixed: WC tranformation update when
the Window is invalid. Thanks to Marian Trifon.
- Fixed: polygon filling in simulation
base driver.
- Fixed: invalid resample in
PutImageRect* in GDI+ base driver cause a band with a mix of the
background color appear on right and bottom when image is zoomed in (larger
than original size).
Version 4.4 (12/Dec/2005)
- New: CDLua for Lua 5. The CDLua for Lua 3 is now also totally compatible with the "cd." name space used in the
CDLUA for Lua 5. So the documentation now reflects only the new nomenclature although the old CDLua 3 names are still
valid.
- New: attribute "WINDOWRGN" for the Native Windows and IUP drivers to set the shape
of a window to the current complex clipping region.
- New: cdlua_close function to release the memory allocated by the
cdlua_open.
- New: "ROTATE" attribute for PS driver, GDI+ base driver and GDI base driver.
- New: CD_FILLSPLINE and CD_SPLINE parameters for
cdBegin in GDI+ base driver.
- New: support for complex regions for clipping using: cdBox,
cdSector, Polygons and
cdText. New: parameter CD_REGION for
cdBegin to create the region, new parameter CD_CLIPREGION
for cdClip to select the region for clipping.
New: funtions to control regions:
cdPointInRegion, cdOffsetRegion,
cdRegionBox and cdRegionCombineMode.
Valid only for the Windows GDI, GDI+ and X-Windows base drivers and their derived drives.
- New: mode for cdBegin, CD_BEZIER.
- New: filled primitive cdChord.
- New: polygon fill rule control using cdFillMode with
CD_EVENODD (the default) and CD_WINDING parameters.
- New: line cap and line join styles using cdLineCap and
cdLineJoin.
- New: typeface CD_NATIVE to indicate that a native font has been selected.
- New: custom line style using cdLineStyleDashes and
cdLineStyle(CD_CUSTOM). This replaces the
attribute "USERLINESTYLE".
(All New:, when not specified the divers, are valid for all the drivers, except DXF, DGN e CGM.)
- New: text utility function cdTextBounds that returns the oriented bounding
rectangle.
- New: "IMAGEFORMAT" and "IMAGEALPHA" attributes for
the Windows base driver.
- New: In GDI+, the CD_CLIPBOARD driver supports EMF and BMP formats.
- New: function cdReleaseState to release the memory allocated by a state.
The cdRestoreState does not release the memory anymore so it can be used
several times for the same state.
- Fixed: Invalid cdKillImage in X-Windows when active canvas is not the canvas where the image was created.
- Fixed: Text clipping for CD_IMAGERGB driver.
- Fixed: fixed size in milimeter of cdGetScreenSize in Win32.
- Fixed: fixed size of the EMF picture.
- Fixed: fixed the parse of filenames with spaces for all file based drivers. The filename must be inside
double quotes (") if it has spaces.
- Fixed: cdSetAttribute in Lua now can set nil values.
- Fixed: fixed cdSector when interior style is
CD_HOLLOW, to include two lines connecting to the center point.
- Fixed: In GDI+, the NATIVEWINDOW driver ignored other data pointer configurations in
cdCreateCanvas.
- Fixed: In GDI+, cdStipple was not updated when the foreground or
background colors where changed.
- Fixed: In GDI+, cdSector and cdArc
have incorrect angles.
- Fixed: "simple.c" and "simple.zip" were outdated. Now new makefiles were added.
- Fixed: in Windows base driver small incompatibility in cdNativeFont with the IUP FONT attribute.
- Changed: Optimization flags now are ON when building the library in all platforms.
- Changed: Upgraded Freetype to version 2.1.10. The CD library file size increased because of this. But we gain
a better text rendering for images.
- Changed: Better organization of the documentation.
- Changed: In Windows the NATIVEWINDOW driver now accepts a NULL pointer to draw in the entire screen.
- Changed: Optimized cdPutImageRGBARect in Windows base driver.
- Changed: Now by default CD will not print X-Windows messages. To enable you must set the CD_XERROR environment
variable.
- Changed: The default fill rule for polygons in CD_PS is now the Even-Odd rule. Matching the other drivers.
- Changed: Line Styles in GDI+ was corrected again to match GDI line styles when line width is not 1.
- Changed: The native WC support in GDI+ was removed because of alignment and size problems, simulation will be used.
- Changed: the EMF drivers now ignore the resolution parameter. For EMFs, the resolution is always the screen
resolution.
- Changed: the value of following attributes were changed to strings "IMAGEMASK",
"IMAGEPOINTS", "ROTATE",
"GRADIENTCOLOR", "IMAGETRANSP" and "IMAGEFORMAT".
- Changed: in GDI+ base driver, the cdBegin modes
CD_IMAGEWARP and CD_GRADIENT were moved to attributes
"IMAGEPOINTS" and "LINEGRADIENT". Mode CD_PATHGRADIENT
was renamed to CD_FILLGRADIENT, and "PATHGRADIENT"
attribute was renamed to "GRADIENTCOLOR". Their definition was also changed.
- Changed: cdImageEx was renamed to cdBitmap,
and now supports only client images. This will cause a conflict with a macro definition in
"im_image.h" header of the IM toolkit. Include this header before "cd.h" and
inbetween set "#undef cdPutBitmap". The IM macro will be changed in the next IM
version.
- Changed: cdText is not dependent on the
cdBackOpacity anymore. Text now is always transparent. If you need a box under the text use
cdTextBox to calculate the dimensions for cdBox.
Version 4.3.3 (25/Aug/2004)
- New: "USERLINESTYLE" attribute for the base GDI and X11 drivers.
- New: "GC" attribute for the base X11 driver.
- Changed: in the Native Window driver for the Windows system, the creation using a HDC can have an addicional
parameter for the canvas size.
- Changed: in cdTextSize for the GDI+ base driver we now compensates the height in -10% to match the GDI height.
- Changed: The GDI+ printer driver now returns the HDC attribute.
- Fixed: fixed a bug in cdNativeFont for the GDI+ base driver.
- Fixed: again fixed a rounding error in cdPutImage* for big zooms.
Version 4.3.2 (14/Apr/2004)
- Fixed: in the Win32 and X-Win drivers the cdPutImageRGB and
cdPutImageMap functions when zooming bigger then the canvas where incorrectly
positioning the image by some pixels because of round errors.
Version 4.3.1 (07/Nov/2003)
- Fixed: in the Win32 driver the clipping of cdPutImage* functions when
zooming was wrong. In the DoubleBuffer driver the main canvas cdOrigin can be
used to move the image in the swap operation (cdFlush). In the GDI+
DoubleBuffer driver there was an error in the cdFlush when some primitive used
world coordinates directly in the main canvas.
Version 4.3 (06/Mar/2003)
- New: the function cdlua_getcanvas retreives the pointer of a canvas created
in Lua.
- New: in Win32 the function cdUseContextPlus change the behavior of the
Windows drivers NativeWindow, IUP, Image, Printer, EMF and Double Buffer to make them use the GDI+ for drawing. GDI+
does not have support for XOR Write Mode, but it has other resources like: transparency, anti-aliasing, gradient
filling, bezier lines and filled cardinal splines. WC functions are directly implemented in the base driver. Two new
functions were created to support transparency in the CD color coding: cdEncodeAlpha
and cdDecodeAlpha.Check the documentation for more information.
- Changed: the Lua binding is now distributed in the same package. There is only one version number.
- Fixed: the PS header had same flaws, the character ":" was missing in some DCS attributes.
- Fixed: screen resolution was wrong in the Win32 driver, this afects the size of the canvas in milimeters.
- Fixed: in the Win32 driver the creation of a polygon for clipping does not activate the clipping.
- Fixed: in the Win32 driver the function cdNativeFont using "-d"
parameter need some ajusts. Also the returned string does not contains all the used parameters.
- Fixed: in the Win32 driver the function cdPutImageRectRGBA had a
positioning error.
Version 4.2 (20/July/2001)
- Changed: in driver Win32, cdNativeFont accepts parameter
"-d" on the font name to show the font-selection dialog.
- Changed: the whole code can now be compiled as C++.
- Changed: functions wdPattern and wdStipple
were changed to make pattern deformation more uniform.
- Fixed: in the Clipboard driver on Win32, when parameter "-b" was used the
image was not correctly copied.
- Fixed: in certain moments, color vectors were being allocated with size 4 and should be
"sizeof(long)". This was done to improve the compatibility with 64-bit systems.
- Fixed: cdPutImageRectRGB in driver ImageRGB had a memory-invasion
error in some cases when the image was placed in a negative coordinate.
Version 4.1.10 (04/May/2000)
- Changed: the driver Native Windows in Win32 now also accepts an already created HDC handle as a parameter.
- Changed: in the cdPutImageMap* functions, in case the color
vector is null, a vector with 256 gray shades in assumed.
- Fixed: cdRegisterAttribute was not verifying whether the attribute had
already been registered.
- Fixed: function cdArc in the simulation driver (includes
ImageRGB) was returning without drawing anything in an incorrect test.
- Fixed: function cdTextBox was returning incorrect values when the text
had an orientation different from the default one in some alignment instances.
- Fixed: in function cdRGB2Map there was a memory invasion.
- Fixed: the vector text simulation was not freeing the memory used for fonts loaded from files.
- Fixed: in the Doubled Buffer driver in X-Windows there was an invalid memory liberation.
- Fixed: in the Lua binding, in several functions receiving or returning tables, the first index was being
considered as 0, but in Lua they must be 1. This correction includes
cdVectorTextTransform, cdGetVectorTextBounds, wdGetVectorTextBounds,
cdGetClipPoly and wdGetClipPoly.
- Fixed: when the PS driver generated EPS, it did not correctly add the description of the bounding box (a line
break was missing).
- Fixed: the vector text drawing functions did not take into account the fact that the default font and the GKS
fonts were in ASCII standard. Now a conversion from ANSI to ASCII is made before these fonts are used for drawing.
- Fixed: in the X-Win driver, an error in the X-Vertex library caused the texts in 90/270 degrees to be drawn
incorrectly.
- Fixed: in the X-Win driver, the cdPutImageMap functions were
generating a memory invasion when the X was in 16 bits.
- Fixed: in the Win32 driver, very large non-filled polygons were not being drawn in Windows 9x. To correct
that, they were divided into smaller polygons.
Version 4.1 (24/Nov/99)
- New: new basic Windows driver attributes that allow controling the internal simulation of pattern/stipple, XOR
text, and filled polygon ("SIMXORTEXT", "SIMPATTERN8X8",
"PENFILLPOLY"). New: attribute for returning the HDC of the Windows canvas.
- New: the PS driver accepts landscape orientation as a parameter.
New: "POLYHOLE"
attribute allows controling the number of holes in a closed polygon. New: "-1"
parameter forces a level 1 Postscript. New: "-g" parameter adds comments to the PS file
in order to better explain what is done. New: "CMD" attribute saves a string to the
file.
- New: new environment variable, CD_QUIET, does not display in stdout the
library's version information.
- New: two new exclusive functions for the Native Window driver: cdGetScreenColorPlanes
and cdGetScreenSize.
- New: new CD_DBUFFER driver implements a double buffer using a server image.
- New: new attributes in the ImageRGB driver: "REDIMAGE", "GREENIMAGE"
and "BLUEIMAGE".
- New: new functions wdGetVectorTextBounds and
cdGetVectorTextBounds to obtain the bounding box of the vector text.
- New: new wdGetFont function. It is equivalent to
cdGetFont, but the returned size is in millimeters.
- Fixed: the management of WD functions was incomplete for functions cdPixel,
cdVertex and cdPutImage*. This resulted in a
wrong or out of the canvas positioning. It only affects drivers PS and METAFILE.
- Fixed: function cdActivate in Lua was not returning the correct
values.
- Fixed: when the image was partially out of the window, above or below, functions
cdPutImageMap and RGB were drawing a wrong
portion of the image.
- Fixed: in the CGM driver, after opening the file of the cdPlay
function, the check to see if the opening had been successful was not being done.
- Fixed: when the active canvas was already NULL, the activation of a
NULL canvas was generating a memory invasion.
- Fixed: in the creation of EPS, the PS driver was adding a wrong call to
setpagedevice. The cdPutImageMap function was modifying the
wrong PS parameter in the file. The margin clipping was not saved when the drawing's clipping area was changed. The
clipping area, when drawing in WD, was being incorrectly modified.
- Fixed: in the IMAGERGB driver, functions cdRedImage, cdBlueImage
and cdGreenImage were returning invalid pointers.
- Fixed: when initializing text simulation functions, the opened font file was not being closed. This affected
all CD drivers, but was only apparent in the application that opened and closed many drivers.
- Fixed: the approximate computation of the text size was not accepting sizes in pixels.
- Fixed: the creation of the IMAGERGB driver in Lua was incorrect when the resolution parameter (which is
optional) was not specified.
- Fixed: functions cdGetClipPoly and
wdGetClipPoly in Lua were causing memory invasion.
- Changed: in the PS driver, when the Map image is actually a grayscale, function
cdPutImageMap uses an 8 bit image, thus saving memory. Level 2 Postscript functions
rectfill, rectstroke and rectclip are now used. The
comments in DCS were updated to DCS version 3 and were increased to improve the document's portability.
- Changed: in driver X-Windows, the text drawing attribute was implemented with any orientation.
- Changed: function cdVersion in Lua now behaves just like in C. A global Lua
variable, CDLUA_VERSION, was created containing the version of the Lua binding
library - for example: "CDLua 1.3.0".
- Changed: function cdVectorTextTransform now returns the previsous
transformation matrix.
Version 4.0.1 (05/Mar/99)
- Fixed: in the Windows driver, the polygon simulation with pattern was corrected to polygons with repeated
points.
- Fixed: in the Windows driver, function cdNativeFont was
corrected for IUP fonts. It was affecting the Matrix's visualization.
- Fixed: function cdNativeFont was wrongly testing its input
parameter and always returning.
- Fixed: in the drivers IUP and Native Window, the cdGetCanvasSize
function was corrected. When the window size was changed, the values in millimeters were not updated to
cdActivate.
- Fixed: in the CGM driver, function cdPlay was generating
problems in reading and displaying cell arrays. When the cdCreateCanvas
function used the default values for dimensions and resolution, it generated files with errors.
- Changed: in the X-Windows driver, function cdPixel was
optimized. It now compares the color to the foreground color and reuses the value.
Version 4.0 (18/Feb/99)
- Summary: (necessary due to the great number of changes).
- Update of the Lua binding.
- Several changes in the internal structure (most bringing benefits only to the driver developer).
- Countless corrections.
- Small changes in the functions cdHatch, cdScrollImage, cdFont
and cdPlay.
- Optimization of functions wdVectorFont and
cdMark.
- New: functions:
cdCreateCanvasf, cdGetContext, cdContextCaps,
cdSaveState, cdRestoreState, cdSetAttribute, cdGetAttribute
cdOrigin, cdRect, wdRect, cdGetFont, cdGetStipple, cdGetPattern,
cdTextBox
cdPutImageRectRGB, cdPutImageRectRGBA, cdPutImageRectMap,
cdCreateImageEx, cdKillImageEx, cdPutImageEx, cdGetImageEx.
- New: WD functions: wdHardcopy, wdPattern, wdStipple, wdPixel, wdPutImageRect,
wdPutImageRectRGB, wdPutImageRectRGBA and wdPutImageRectMap.
- New: vector text functions: cdVectorFont, cdVectorTextDirection,
cdVectorTextTransform, cdVectorTextSize, cdGetVectorTextSize, cdVectorCharSize, cdVectorText and
cdMultiLineVectorText.
- wdActivate is no longer necessary.
- Driver IMAGERGB complete.
- Driver SIMULATE no longer exists; now function cdSimulate must be
used.
- New: driver DIRECTDRAW.
- Policy change of cdPalette in the X-Windows driver
- IUP driver is now in a separate library.
IMPORTANT NOTE: This version is not totally compatible to the previous one. The applications using the driver IUP
must be relinked, as this driver is now in a separate library, "cdiup". The Lua applications must also
be modified to include a call to function cdluaiup_open after
cdlua_open, and must be linked with the "cdluaiup"
library. The SIMULATE driver no longer exists, therefore the applications that used it must be modified to use the new
function, cdSimulate, without the need for creating a new driver.
- Changed: the internal structure of the library was changed once again. One of the purposes is to make the
drivers become independent from the function table. With this change, adding a new function to the function table does
not imply editing the old drivers. We also allowed the drivers not to implement functions that do not make sense in
their context. Another modification simplifying the work in the drivers was to bring the attribute query mechanism to
the library's control part, freeing the drivers from this obligation. Taking the chance, we determined that a change
in an attribute to a value equal to the current one will not be effective, thus saving calls to the driver. Now, the
value of an attribute is changed even if the driver function is not implemented, as the driver can query this
attribute later on. The management of default values of the attributes is also done by the library's control part. All
these changes prepare the library to a new philosophy: before, if a driver did not contain a certain feature, it
simply did nothing. The new philosophy will be: if a driver does not contain a certain feature, then the simulation of
this feature will be activated.
- Changed: when a canvas which is already active is activated again, an internal driver function is now called,
notifying an update instead of an activation.
- Changed: the use of the CD canvas with a IUP canvas is better described in the manual, showing the various
ways of treating the canvas creation prooblem.
- Changed: all functions in the control module now have ASSERT directives. Thus,
using the library with depuration information, one can better detect simple errors.
- Changed: in order to use the IUP driver, it must be linked with the "cdiup" library, apart
from the "cd" library (cdiup.lib in Windows,
cdiuplib.a in UNIX).
- Changed: the IMAGERGB driver is now implemented using the simulation functions.
- Changed: the cdMark function is back to the function table, so that the
drivers in which the primitive can be implemented can profit from it.
- Changed: in order to assure that the use of server images is done only between canvases of the same driver, or
of the same basic driver, an internal structure was defined for the server image containing the functions of the
driver from which the image was created. Thus, if the cdKillImage function is
called with an active canvas of a different kind from that in which the image was created, the
KillImage function of the correct driver will be called.
- Changed: in the X-Windows driver, the XV code was used to optimize functions
cdPutImageRectRGB and cdPutImageRectMap.
- Changed: the Lua binding was updated. Now the user guide contains Lua function together with C functions.
- Changed: in the X-Windows driver, cdPalette's policy was changed to fulfill
the requirements of some applications, which wanted to force a palette. Please see the function's documentation in the
driver.
- Changed: the CGM driver used to always store the cdForeground
attribute before drawing a primitive; now it stores the attribute only when it is changed. The
cdBackOpacity function was not implemented. The
cdFlush function was not preserving the canvas attributes. Now when
the canvas size is not specified in the cdCreateCanvas function, the
VDC Extension saved to the file is the figure's bounding rectangle. The patterns and/or stipples selected were being
stored in a way so that only the first one was valid.
- Changed: the documentation of the old DOS driver was removed from the user guide.
- Changed: the default resolution for drivers DGN, DXF, METAFILE, CGM and ImageRGB is no longer 1 but 3.8 points per
mm (96 DPI).
- Changed: in the cdInteriorStyle function, if stipple or pattern are not
defined, the state of the attribute is not modified. There is no longer a default 32x32 pattern or stipple.
- Changed: in functions cdFontDim and cdTextSize,
if the driver does not support this kind of query, the values are estimated.
- Changed: function cdHatch now returns the previous value.
- Changed: function cdScrollImage is now called
cdScrollArea, better reflecting its functionality, since it does not require any explicitly defined image
to be performed. The old function is maintained to assure compatibility with old applications.
- Changed: the cdPlay function now accepts all window parameters null. In this
case, the primitives in the file are interpreted without scaling.
- Changed: cdFontnow accepts font sizes in pixels when negative values are
used as a parameter.
- Changed: the WD functions were included in the library's function table, so that the drivers can use floating point
precision when storing primitives. Presently, only the drivers PS and METAFILE have this resource directly
implemented. With this change, the wdActivate function became obsolete and is
no longer necessary. For purposes of compatibility with other applications, it was maintained only as a call to
function cdActivate.
- Changed: drivers EMF and WMF now accept the resolution as a parameter.
- New: internal modification of the Windows driver to allow the creation of the DirectDraw driver.
- New: DirectDraw driver to accelerate video access to high-performance applications.
- New: function cdInteriorStyle now accepts style
CD_HOLLOW. When this style is defined, the cdBox and
cdSector functions behave like their equivalents
cdRect and cdArc, and the polygons with the
CD_FILL style behave like CD_CLOSED_LINES.
- New: new functions:
- cdCreateCanvasf accepts parameters equivalent to
sprintf, helping in the creation of some canvases.
- cdOrigin allows translating the origin - for instance, to the center of the
canvas.
- cdGetContext returns the context of a given canvas; it can be compared with
predefined contexts, such as "CD_PS".
- cdSaveState and cdRestoreState
allow saving and restoring the state of attributes of the active canvas.
- cdSetAttribute and cdGetAttribute
allow passing customized attributes to the driver, which are ignored if the driver does not have the attribute
defined.
- cdContextCaps returns a combination of several flags informing the
available resources of the canvas in that context.
- Driver SIMULATE no longer exists. Now function cdSimulate must be
used. The simulation can be activated and deactivated at any moment.
- cdRect and wdRect allow drawing a box
with no filling.
- cdGetFont returns the values of the font modified by function
cdFont and ignores those modified by cdNativeFont.
- cdTextBox returns the horizontal bounding rectangle of the text
box, even if it is bended.
- cdGetStipple and cdGetPattern
return current stipple and pattern. With these functions and with function cdGetFont,
one can now totally change and restore the attributes of a given canvas.
- wdPattern and wdStipple allow
specifying the style in world coordinates. The size of the image is modified to the specified size in millimeters.
- functions cdPutImageRectRGB, cdPutImageRectRGBA and
cdPutImageRectMap allow specifying a rectangle in the image to be used for the drawing instead of the whole
image.
- wdPixel, wdPutImageRect, wdPutImageRectRGB, wdPutImageRectRGBA
and wdPutImageRectMap are equivalent to cdPixel,
cdPutImageRect, cdPutImageRectRGB, cdPutImageRectRGBA and
cdPutImageRectMap, respectively, but the target coordinates are specified in world coordinates.
- New: vector text functions: cdVectorFont, cdVectorTextDirection,
cdVectorTextTransform, cdVectorTextSize, cdGetVectorTextSize,
cdVectorCharSize, cdVectorText, cdMultiLineVectorText. The vector
text can now be used without the need of world coordinates. Functions wdVectorFont
and wdVectorTextTransform have become obsolete, though they
still exist for compatibility reasons.
- wdHarcopy helps drawing WD primitives in devices, adjusting Window
and Viewport.
- Auxiliary functions were created to manipulate all sorts of images in a single way, being either client, RGB, RGBA,
MAP, or server images: cdCreateImageEx, cdKillImageEx, cdPutImageEx,
cdGetImageEx, etc.
- Fixed: the documentation of function cdFont was confusing, causing
errors in the conversion from pixels to points.
- Fixed: function wdFont was making a wrong conversion of the font size
parameter from millimeters to points.
- Fixed: functions wdVectorText and
wdMultiLineVectorText were generating an extra polygon when the text contained blank spaces in certain
positions.
- Fixed: the PS driver was not prepared for marked texts. Function cdFlush
did not preserve current attributes. The interior style was affecting line drawing. The text alignment now takes into
account an estimation for the baseline. Function cdTextOrientation
was implemented. The world coordinate functions were implemented directly in the driver. Hatch and stipple interior
styles were implemented, but they are still only opaque.
- Fixed: in the X-Windows driver, function cdGetColorPlanes was
returning 8 bpp even if the canvas was 24 bbp when the default visualization was different from the canvas'
visualization in that X server. Text position on the screen was above the one entered. Function
cdFont was looping in certain conditions. Function
cdEnd in the X-Windows driver in the AIX system was generating an error and aborting the program if only
one point of the polygon was specified. Dashed lines were always opaque, ignoring the
cdBackOpacity attribute.
- Fixed: in the Clipboard driver for X-Windows, a parameter was missing which prevented it from working
properly. Before the update, it used that of the IUP/Native Window active canvas.
- Fixed: in the Windows driver, the text position on the screen was above the position provided. Filled
polygons had a one pixel error to the right and below due to the small NULL used.
Fillings with hatch, pattern and stipple still contain errors. The internal simulation of polygons filled with pattern
and stipple was also corrected; they had one additional pixel to the right and below. Text alignment treatment was
improved.
- Fixed: driver WMF now has text alignment.
- Fixed: in the PRINTER (Windows) driver, function cdFlush was
not preserving current attributes.
- Fixed: in the CGM driver, the text align interpretation was corrected. The
cdMark function is implemented directly in the driver. Function
cdBackOpacity was implemented. Mark interpretation was also corrected.
- OPTIMIZATION: function wdVectorFont only loads the new font if it is
different from the current one.
- OPTIMIZATION: function cdMark now modifies fill and line attributes only if
they are different from the one needed to draw the mark.
Version 3.6 (05/May/98)
- Fixed: / Win32: every time the clipping region changed the old region was not deleted.
- New: new function cdRGB2Map, which converts an RGB image into a
256 indexed-colors image. It is the same algorithm used in the IM library - in fact, it is the same code.
- Changed: the cdMark function now uses the
cdPixel function when drawing a mark of 1 pixel size.
- Changed: / Win32: the cdPixel function now uses the
SetPixelV function when not under Win32s. This function is faster than the
SetPixel function because it does not return the old value.
- Changed: / Win32: the polygon used for clipping is now optimized to not include 3 points that are in the same
horizontal or vertical line.
- Fixed: / WD: the wdVectorText function was not drawing
correctly when extended characters (>128) were used.
- Fixed: / X: the cdPalette function and the color management
for canvases with only 256 colors were wrong. Each canvas had its own management, now all canvases in the same
aplication use the same management.
- Fixed: / X: several resource and memory leaks were corrected.
- Fixed: / IMAGERGB: functions cdRedImage,
cdGreenImage and cdBlueImage
were not returning the correct pointer.
- Fixed: / SunOS: drivers IMAGERGB, SIMULATE and NATIVEWINDOW use the "%p" format string, but in the SunOS
they use "%d" because of an internal bug of the run time library of this OS.
- Changed: / IUP: driver IUP sets the cdCanvas function as an
attribute of the IupCanvas passed as a parameter using the name
"_CD_CANVAS".
- MANUAL: the manual appearance was changed to match the new Tecgraf standard.
Version 3.5 (07/Jan/98)
- New: the cdTextDirection function allows raster text to be drawn
in any direction. Up to now it is implemented only in the basic Win32 driver.
- Fixed: / X / NativeWindow: the canvas was not created if the screen was 0.
- Fixed: / Win32 / NativeWindow: now the driver considers the existence of non owner-draw device contexts.
- Fixed: / Win32: function cdClipArea was not including
xmax and xmin in the clipping area.
- Changed: the cdCallback typedef was defined, being useful for
type casting when calling the cdRegisterCallback function.
- Fixed: / Win32: a compatibility problem with the cdNativeFont
string and the WINFONT IUP attribute was corrected.
- Changed: / Win32: the cdPutImageRGB and
cdPutImageMap functions use a cache memory for best performance.
- Fixed: text size estimation for the CGM and PS drivers now uses Courier
New: as the "System" font. As it was,
it was causing a memory invasion.
Version 3.4 (12/Nov/97)
- Changed: / X: memory use of the cdPutImageRGB,
cdPutImageRGBA and cdPutImageMap
functions was optimized, as well as the performance of the cdPutImageMap
function.
- Changed: / X and Win32: when the canvas has bpp <= 8, function cdPutImageRGB
converts the image into Map before displaying it.
- Changed: / X and Win32: if a font's parameters are the same as the current parameters, the
cdFont function does nothing.
- DOC / PS: the "-d" parameter for the EPS option was not documented.
- Fixed: / PS: parameters "-w" and "-h" were incorrectly interpreted.
- Fixed: / X: the internal function names were generating an error in the VMS plataform.
- Fixed: / X: the cdKillCanvas function was freeing some
pointers of the active canvas.
- Changed: / Win32: the cdVertex function now ignores duplicate
points.
- Changed: / Win32: the cdNativeFont function also accepts the
font string of the WINFONT IUP attribute.
- Fixed: / DXF: corrections in color conversion and in the cdArc
function for small radius were made, and an unnecessary identation was removed.
Version 3.3 (19/Sep/97)
- Changed: / X: the cdFont function now has a better heuristic
to find a closer font if the requested font does not match an available one.
- Changed: / X: the cdPattern and
cdStipple functions now use a bitmap cache to store the pixmap and
do not recreate it if the size is not changed.
- Fixed: / X and Win32: the cdPutImageRect function was placing
the bitmap in a wrong position.
- Fixed: / Win32: the cdCreateImage function did not return
NULL when the creating failed.
- Changed: / Win32: the cdPutImageRGB,
cdPutImageRGBA and cdPutImageMap functions
were largely optimized when the picture displayed is larger than the screen.
- Changed: / WMF: using the cdPlay function we discovered that
the size of the picture was incorrect in the header file, so we first had to calculate the bounding box and then
interpret the picture.
- Changed: / PS and CGM: now the cdFontDim and
cdTextSize functions return approximate dimensions, instead of
nothing.
- Fixed: / PS: the default font was not being set when the canvas was created.
- Fixed: / PS: text alignment was incorrect in the vertical direction.
- Fixed: / SIM: the clipping algorithm of the cdPixel function
of the Simulation driver was corrected.
- Fixed: / CD: now you can activate a NULL canvas. When you get the active
canvas and restore it, if it was NULL the cdActivate
function was accessing an invalid pointer.
- MANUAL: several changes were made on the online manual structure, and were added to the CDLua page.
Version 3.2
- A problem in the cdFlush function in the Postscript driver was
corrected. It was not setting the scale.
- Functions wdFontDim and
wdTextSize now check if the return pointers are not NULL.
- An internal function in the DGN driver was drawing an ellipse with two times the axis size.
- The cdFont function was corrected to store the font names in the
CGM driver.
Version 3.1
- Several minor bugs in the Win32 Printer driver and in the Postscript driver were corrected. The EPS mode of the PS
driver now generates a "showpage" PS function so it can be printed.
- The Clipboard driver was implemented in Motif. The cdPlay
function was implemented in the Motif and Win32 Clipboard drivers.
- The cdRegisterCallback function was added to allow the
customization of the cdPlay function's behavior.
- The wdVectorTextTransform function allows a 2D transformation
applied to any vector text.
- Now the Simulation driver has several levels of simulation, and the simulation was improved with pattern and
clipping simulation.
Version 3.0
- The library's architecture underwent several changes. The function tables are no longer public, only the drivers
know its structure. This means that we have eliminated the need to recompile applications that use the dynamic library
when we change something in the function table. There are some other benefits, like the fact that the Windows DLL can
now be implemented and that it is more simple to explain the library to new users, so they will not be confused by the
cdprivat.h header.
- Corrections to the text alignment of the wdVectortext function
were made.
- Memory allocation of the cdPattern and
cdStipple functions in the basic Windows driver was corrected.
- Memory release of the cdKillCanvas function in the basic Windows
driver was corrected.
- The cdPattern function was implemented in the Postscript driver,
and the cdPutImageRGB and
cdPutImageMap functions now write color images.
- The cdPattern function was corrected in the basic X-Windows
driver for use with clipping.
- The compiler directive #include<malloc.h> was changed to
#include<stdlib.h> in several modules for better compatibility with
other compilers.
- The cdPlay function now accepts the viewport rectangle where the
drawing will be rendered.
- Several navigation changes were made to the user guide pages.
- A new CD_SIMULATE driver was created. Use it to replace some primitives and to handle attributes
of another driver. It can be used with any other driver. Basically, it substitutes the interior style of dependent
primitives: box, sector and filled polygons. It also substitutes the clipping methods of these primitives.
- The Windows DLL version of the library was created.
Version 2.2.1
- Interrnal macros that affect wdArc and
wdSector were corrected.
- The CGM driver now supports some client image functions.
- Hatch styles in the Image RGB driver were corrected.
Version 2.2.0
New: Functions:
cdVersion - returns the current library version.
cdNativeFont - sets a native font.
cdPutImageRect - same as
cdPutImage but you may specify a part of the image.
cdPutImageRGBA - cdPutImageRGB
with transparency.
wdFont - cdFont
for the WD client, the size parameter is in millimeters.
New: Drivers:
NativeWindow - now the library can work with other Interface libraries.
DGN - MicroStation Design File.
EMF - Windows Enhanced Metafile.
CD Metafile - our own metafile.
Client Image RGB - now you can write in an RGB image.
- DGN, CGM and DXF file-based drivers now have a default size in
pixels (INT_MAX = 2.147.483.647) and are optional. In fact the size is irrelevant in these file
formats. The cdCreateCanvas data string may contain the size in
millimeters and the resolution in pixels per millimeters. Both are real values. The default resolution is 1.
- The cdPlay function now works on the CGM and on the CD Metafile
drivers.
- The interior style attributes were implemented in the CGM driver.
- On the Clipboard driver: limitations are considered if creating a WMF under Win32s.
- Now the Printer Driver shows the Printer's Dialog Box (Win32 & Mac) if the parameter "-d" is specified.
- On the PS driver: all the dimensions in the Data parameter string are now in millimeters.
- On the WMF driver: several functions were disabled because of WMF limitations. Picture size was corrected.
- On the basic X-Windows driver: cdLineWidth(1) uses
width 0 for better performance. Stipple was being incorrectly interpreted.
cdGetImageRGB was swapping red and blue channels on true color
canvas.
- The clipping region now can be a polygon on some systems/drivers (Win32, Mac, X-Win and PS). Use
cdClip(CD_CLIPPOLYGON) to use the polygon defined by a
cdBegin(CD_CLIP), cdVertex(...),
cdEnd() sequence.
- The functions wdMM2Pixel and
wdPixel2MM became cdMM2Pixel and
cdPixel2MM, respectively.
- Minor bugs in the wdFontDim,
wdLineWidth and wdMarkSize functions were corrected.
- wdVectorCharSize now returns the previous value.
Up to Version 2.1
- The cdActiveCanvas, cdPlay
and the wdVectorFont functions were added, and the
cdKillCanvas function was corrected when destroying the current
canvas.
- The cdMark function no longer depends on line style, line width
and interior style attributes, and it is the same for all drivers because it is implemented only with CD functions.
- The wdLineWidth and wdMarkSize
functions now use millimeters.
- The functions cdEncodeColor and
cdDecodeColor now can be called without an active canvas. The DXF driver was added.
- WD can now access files with vector font definitions.
- Minor bugs in the wdTextSize function were corrected.