From d96819756a30e82b52798487343a4fcbdec11a88 Mon Sep 17 00:00:00 2001 From: scuri Date: Fri, 27 Nov 2009 22:44:15 +0000 Subject: Fixed: polygon filling in the IMAGERGB driver when the segments contain horizontal lines. --- html/en/cdluaim.html | 7 +- html/en/drv/irgb.html | 7 +- html/en/history.html | 7 +- src/drv/cdirgb.c | 112 ++++----------- src/drv/cdmf.c | 2 +- src/sim/cd_truetype.c | 7 +- src/sim/sim.h | 7 +- src/sim/sim_linepolyfill.c | 345 +++++++++++++++++++++++++++++++-------------- src/sim/sim_primitives.c | 2 +- test/simple/simple.c | 28 +++- 10 files changed, 320 insertions(+), 204 deletions(-) diff --git a/html/en/cdluaim.html b/html/en/cdluaim.html index 6629558..72b3c77 100644 --- a/html/en/cdluaim.html +++ b/html/en/cdluaim.html @@ -38,11 +38,12 @@ and IMLua were initialized. require"cdluaim" can also be used.

Creates a cdBitmap from an imImage, but reuses image data. When the cdBitmap is destroyed, the data is preserved.

image:cdCanvasPutImageRect(canvas: cdCanvas, x: number, y: number, w: number, h: number, xmin: number, xmax: number, ymin: number, ymax: number) [in Lua] 
-

    Draws the imImage into the given cdCanvas. The imImage must be a -bitmap image, see \ref imImageIsBitmap.

+

    Draws the imImage into the given cdCanvas. The imImage +must be a bitmap image, see imImageIsBitmap in IM documentation.

image:wdCanvasPutImageRect(canvas: cdCanvas, x: number, y: number, w: number, h: number, xmin: number, xmax: number, ymin: number, ymax: number) [in Lua]     

Draws the imImage into the given cdCanvas using world coordinates. The -imImage must be a bitmap image, see \ref imImageIsBitmap.

+imImage must be a bitmap image, see imImageIsBitmap in IM +documentation.

image:cdCanvasGetImage(canvas: cdCanvas, x: number, y: number) [in Lua]     

Retrieve the imImage data from the given cdCanvas. The imImage must be a IM_RGB/IM_BYTE image.

diff --git a/html/en/drv/irgb.html b/html/en/drv/irgb.html index 0689dfc..20101b6 100644 --- a/html/en/drv/irgb.html +++ b/html/en/drv/irgb.html @@ -31,7 +31,8 @@ or

It must include the canvas' dimensions. Width and height are provided in pixels (note the lowercase "x" between them). As an option, you can specify the buffers to be used by - the driver, so that you can draw over an existing image. The resolution can be defined with parameter + the driver, so that you can draw over an existing image, [r g b] or [r g b a] + are pointers to the component buffer, just like PutImageRectRGB/A. The resolution can be defined with parameter -r; its default value is "3.78 pixels/mm" (96 DPI). 

When the parameter -a is specified an alpha channel will be added to the canvas underlying image. All primitives will be composed using an over operator @@ -45,11 +46,11 @@ They are not initialized when allocated by the application.

cdKillCanvas is required to release internal allocated memory.

In Lua, the canvas can be created in two ways: with an already defined image or without it. With an image, an RGB - image must be passed as parameter, created by functions + image must be passed as parameter instead of the string, created by functions cd.CreateImageRGB, cd.CreateImageRGBA or cd.CreateBitmap - in Lua. The resolution must be passed in an extra parameter after the image.

+ in Lua. The resolution must be passed in a second parameter after the image.

Exclusive Functions

diff --git a/html/en/history.html b/html/en/history.html index 81db388..b44d176 100644 --- a/html/en/history.html +++ b/html/en/history.html @@ -19,7 +19,7 @@

History of Changes

-

CVS (27/Oct/2009)

+

CVS (27/Nov/2009)

Version 5.2 (26/Jun/2009)