Modules | |
Test Pattern Generators | |
Macros | |
#define | vc_draw_edgecontours_d(img, xyList, nr, col, subpixelIff1) vc_draw_edgecontours_( img, xyList, nr, col, subpixelIff1, (void (*)())FL_wpset_U8) |
Draws Edgecontours from List. More... | |
Functions | |
I32 | vc_draw_line (image *a, F32 cx, F32 cy, F32 b, I32 col, void(*func)()) |
Draws a Line in Normalized Floatingpoint Form. More... | |
I32 | vc_line_restrict_to_image (image *img, I32 x0, I32 y0, I32 x1, I32 y1, I32 *x0Rstr, I32 *y0Rstr, I32 *x1Rstr, I32 *y1Rstr) |
Restricts Line Coordinates to fit an Image. More... | |
I32 | line (image *a, I32 x1, I32 y1, I32 x2, I32 y2, I32 col, void(*func)()) |
Draws a Line between two Coordinates. More... | |
void | chprint (char *str, image *a, I32 cx, I32 cy) |
Draws String Content. More... | |
void | chprint1 (char *str, image *a, I32 cx, I32 cy, I32 val) |
Draws String Content. More... | |
I32 | chprint_centered_at_pos_lines (image *img, char *acStr, I32 x, I32 y, I32 cx, I32 cy, I32 col, I32 lineNr, I32 linesTotal) |
Draws String Content to Position. More... | |
void | chprint_4x6 (image *img, char *pText, int chars, char uppercasingIff1, unsigned char colTxt, int colBg) |
Draws String Content using a Small 4x6 Font. More... | |
void | chprint_4x6_select (image *img, int entries, char uppercasingIff1, unsigned char colTxt, int colBg, int highlightEntryIdx, unsigned char colHighlightTxt, int colHighlightBg, int selectEntryIdx, unsigned char colSelectTxt, int colSelectBg, unsigned char colBothTxt, int colBothBg,...) |
Draws String Content using a Small 4x6 Font, different Highlight and Select Color. More... | |
void | MarkBoxN (image *img, I32 x, I32 y, I32 dx, I32 dy, I32 col, void(*func)()) |
Draws a Box. More... | |
void | MarkSolidBoxN (image *img, I32 x, I32 y, I32 dx, I32 dy, I32 col, void(*func)()) |
Draws a Solid Box. More... | |
void | MarkCrossN (image *img, I32 x, I32 y, I32 col, I32 size, void(*func)()) |
Draws a Cross. More... | |
void | vc_draw_polygon (image *psImgOut, U32 u32CornerCount, I32 *pi32PxLst, I32 col, void(*func)()) |
Draws a Polygon Contour. More... | |
I32 | fill_polygon_simple (image *psImgOut, U8 color, U32 u32CornerCount, I32 *pi32PxLst, U8 u8FillBackgroundIff1) |
void | draw_polyline (image *psImgOut, U32 u32CornerCount, I32 *pi32PxLst, I32 col, void(*func)()) |
Draws a Polyline Contour. More... | |
I32 | vc_draw_circle (image *a, I32 px, I32 py, I32 rad, I32 col, void(*func)()) |
Draws a Circle (with Window-Clipping). More... | |
void | ellipse (image *a, I32 col, void(*func)()) |
Draws an Ellipse. More... | |
I32 | draw_histo (image *Graph, U32 *Histo, I32 size, I32 BackgndColor, I32 Color, I32 i32Mode, void(*func)()) |
Draws a Grey Level Histogram. More... | |
I32 | draw_histo_quantile (image *pOut, U32 *pu32Histo, U8 u8Percentage, U8 u8Color) |
Draws Quantile at draw_histo() Histogram. More... | |
I32 | draw_histo_line (image *pOut, U8 u8Column, U8 u8Color) |
Draws Line at a Grey Value at draw_histo() Histogram. More... | |
I32 | vc_draw_edgecontours_ (image *img, I32 *xyList, I32 nr, I32 col, I8 subpixelIff1, void(*func)()) |
Draws Edgecontours from List. More... | |
void | frame (image *a, I32 col, void(*func)()) |
Draws a Frame. More... | |
void | dframe (image *a, I32 col, void(*func)()) |
Draws a Double-Width Frame. More... | |
void | marker (image *a, I32 col, void(*func)()) |
Draws a Marker. More... | |
void | dmarker (image *a, I32 col, void(*func)()) |
Draws a Double-Width Marker. More... | |
I32 | vc_image_fill_small_regions (image *imgIn, image *imgOut, I32 chn, I32 lowthr, I32 hithr, I32 labelMethod, I32 minPixel, U32 col) |
Fills Small Regions of an Image Channel. More... | |
void | dashed_U8 (U32 count, U8 *ad_list[], I32 value) |
Basic Drawing Function for Dashed Style. More... | |
void | dotted_U8 (U32 count, U8 *ad_list[], I32 value) |
Basic Drawing Function for Dotted Style. More... | |
void | needled_U8 (U32 count, U8 *ad_list[], I32 value) |
Basic Drawing Function for Needle Style. More... | |
I32 | linexy (I32 dx, I32 dy, I32 *xy) |
Basic Line Creation Routine. More... | |
I32 | EllipseXY (I32 a, I32 b, I32 *xyc) |
Basic Quarter Ellipse Creation. More... | |
I32 | clip (I32 N, I32 *xy_src, I32 *xy_dst, I32 x_min, I32 x_max, I32 y_min, I32 y_max) |
Performs Window-Clipping for Coordinates at a Pixellist. More... | |
void | translate (I32 N, I32 *xy_src, I32 *xy_dst, I32 mx, I32 my) |
Translates Coordinates of a Pixellist. More... | |
void | PL_transform (I32 N, I32 *xy_src, I32 *xy_dst, I32 mx, I32 my, F32 sx, F32 sy) |
Linear Transforms Coordinates of a Pixellist. More... | |
#define | draw_histod(Graph, Histo, size, BackgndColor, Color, i32Mode) draw_histo(Graph, Histo, size, BackgndColor, Color, i32Mode, (void (*)())FL_wpset_U8) |
Draws a Histogram in a given Color. More... | |
#define | draw_histox(Graph, Histo, size, BackgndColor, Color, i32Mode) draw_histo(Graph, Histo, size, BackgndColor, Color, i32Mode, (void (*)())FL_wpxor_U8) |
XORs a Histogram of a given Color within an Image. More... | |
I32 | rlc_fill_polygons_simple (U16 *rlc, U16 rlcDx, U16 rlcDy, U32 rlcMaxBytes, U32 lstCnt, I32 *xyLst, U32 *xyCnt) |
#define | vc_draw_polygond(a, cornercount, pxLst, col) vc_draw_polygon(a, cornercount, pxLst, col, (void (*)())FL_wpset_U8) |
Draws a Polygon Contour in a given Color. More... | |
#define | vc_draw_polygonx(a, cornercount, pxLst, col) vc_draw_polygon(a, cornercount, pxLst, col, (void (*)())FL_wpxor_U8) |
XORs a Polygon Contour of a given Color with an Image. More... | |
#define | draw_polylined(a, cornercount, pxLst, col) draw_polyline(a, cornercount, pxLst, col, (void (*)())FL_wpset_U8) |
Draws a Polyline Contour in a given Color. More... | |
#define | draw_polylinex(a, cornercount, pxLst, col) draw_polyline(a, cornercount, pxLst, col, (void (*)())FL_wpxor_U8) |
XORs a Polyline Contour of a given Color with an Image. More... | |
#define | ellipsed(a, c) ellipse(a, c, (void (*)())FL_wpset_U8) |
Draws an Ellipse in a given Color. More... | |
#define | ellipsex(a, c) ellipse(a, c, (void (*)())FL_wpxor_U8) |
XORs an Elliptic Shaped Contour of a given Color with an Image. More... | |
#define | framed(a, col) frame(a, col, (void (*)())FL_wpset_U8) |
Draws a Frame in a given Color. More... | |
#define | framex(a, col) frame(a, col, (void (*)())FL_wpxor_U8) |
XORs a Frame Shape of a given Color with an Image. More... | |
#define | dframed(a, col) dframe(a, col, (void (*)())FL_wpset_U8) |
Draws a Double-Width Frame in a given Color. More... | |
#define | dframex(a, col) dframe(a, col, (void (*)())FL_wpxor_U8) |
XORs a Double-Width Frame Shape of a given Color with an Image. More... | |
#define | markerd(a, col) marker(a, col, (void (*)())FL_wpset_U8) |
Draws a Marker in a given Color. More... | |
#define | markerx(a, col) marker(a, col, (void (*)())FL_wpxor_U8) |
XORs a Marker Shape of a given Color with an Image. More... | |
#define | dmarkerd(a, col) dmarker(a, col, (void (*)())FL_wpset_U8) |
Draws a Double-Width Marker in a given Color. More... | |
#define | dmarkerx(a, col) dmarker(a, col, (void (*)())FL_wpxor_U8) |
XORs a Double-Width Marker Shape of a given Color with an Image. More... | |
I32 | IntersectionPoints (image *a, float cx, float cy, float b, I32 *X0, I32 *Y0, I32 *X1, I32 *Y1) |
Calculates Two Intersection Points between a Line and the Boundaries of an Image Variable. More... | |
I32 | IntersectionPointsWithRect (float cx, float cy, float b, F32 xMin, F32 yMin, F32 xMax, F32 yMax, F32 *X0, F32 *Y0, F32 *X1, F32 *Y1) |
Calculates Two Intersection Points between a Line and a Boundary Rectangle. More... | |
#define | lined(a, x1, y1, x2, y2, c) line(a, x1, y1, x2, y2, c, (void (*)())FL_wpset_U8) |
Draws a Line in a given Color. More... | |
#define | linex(a, x1, y1, x2, y2, c) line(a, x1, y1, x2, y2, c, (void (*)())FL_wpxor_U8) |
XORs a Line of a given Color within an Image. More... | |
#define | vc_draw_lined(a, cx, cy, b, c) vc_draw_line(a, cx, cy, b, c, (void (*)())FL_wpset_U8) |
Draws a Line in a given Color. More... | |
#define | vc_draw_linex(a, cx, cy, b, c) vc_draw_line(a, cx, cy, b, c, (void (*)())FL_wpxor_U8) |
XORs a Line of a given Color within an Image. More... | |
#define | vc_draw_vclined(a, line, c) vc_draw_line(a, (line)->cx, (line)->cy, (line)->b, c, (void (*)())FL_wpset_U8) |
Draws a vcline in a given Color. More... | |
#define | vc_draw_vclinex(a, line, c) vc_draw_line(a, (line)->cx, (line)->cy, (line)->b, c, (void (*)())FL_wpxor_U8) |
XORs a vcline of a given Color within an Image. More... | |
Functions in this group output geometrical shapes as pixel data, for example functions drawing circles, markers or lines.
#define vc_draw_lined | ( | a, | |
cx, | |||
cy, | |||
b, | |||
c | |||
) | vc_draw_line(a, cx, cy, b, c, (void (*)())FL_wpset_U8) |
The macro draws a line like described in the vc_draw_line() function.
vc_draw_lined() is a macro which calls vc_draw_line() with basic function FL_wpset_U8() as an argument.
#define vc_draw_linex | ( | a, | |
cx, | |||
cy, | |||
b, | |||
c | |||
) | vc_draw_line(a, cx, cy, b, c, (void (*)())FL_wpxor_U8) |
The macro XORs a line like described in the vc_draw_line() function with the image's underlying grey values and writes the result to the position.
vc_draw_linex() is a macro which calls vc_draw_line() with basic function FL_wpxor_U8() as an argument.
#define vc_draw_vclined | ( | a, | |
line, | |||
c | |||
) | vc_draw_line(a, (line)->cx, (line)->cy, (line)->b, c, (void (*)())FL_wpset_U8) |
The macro draws a line like described in the vc_draw_line() function.
vc_draw_vclined() is a macro which calls vc_draw_line() with basic function FL_wpset_U8() as an argument.
#define vc_draw_vclinex | ( | a, | |
line, | |||
c | |||
) | vc_draw_line(a, (line)->cx, (line)->cy, (line)->b, c, (void (*)())FL_wpxor_U8) |
The macro XORs a line like described in the vc_draw_line() function with the image's underlying grey values and writes the result to the position.
vc_draw_vclinex() is a macro which calls vc_draw_line() with basic function FL_wpxor_U8() as an argument.
#define lined | ( | a, | |
x1, | |||
y1, | |||
x2, | |||
y2, | |||
c | |||
) | line(a, x1, y1, x2, y2, c, (void (*)())FL_wpset_U8) |
#define linex | ( | a, | |
x1, | |||
y1, | |||
x2, | |||
y2, | |||
c | |||
) | line(a, x1, y1, x2, y2, c, (void (*)())FL_wpxor_U8) |
#define vc_draw_polygond | ( | a, | |
cornercount, | |||
pxLst, | |||
col | |||
) | vc_draw_polygon(a, cornercount, pxLst, col, (void (*)())FL_wpset_U8) |
The macro draws a polygon as described in the vc_draw_polygon() function using a given color.
vc_draw_polygond() is a macro which calls vc_draw_polygon() with basic function FL_wpset_U8() as an argument.
#define vc_draw_polygonx | ( | a, | |
cornercount, | |||
pxLst, | |||
col | |||
) | vc_draw_polygon(a, cornercount, pxLst, col, (void (*)())FL_wpxor_U8) |
The macro XORs a polygon as described in the vc_draw_polygon() function with the image's underlying grey values and writes the result to the position.
vc_draw_polygonx() is a macro which calls vc_draw_polygon() with basic function FL_wpxor_U8() as an argument.
#define draw_polylined | ( | a, | |
cornercount, | |||
pxLst, | |||
col | |||
) | draw_polyline(a, cornercount, pxLst, col, (void (*)())FL_wpset_U8) |
The macro draws a polyine as described in the draw_polyline() function using a given color.
draw_polylined() is a macro which calls draw_polyline() with basic function FL_wpset_U8() as an argument.
#define draw_polylinex | ( | a, | |
cornercount, | |||
pxLst, | |||
col | |||
) | draw_polyline(a, cornercount, pxLst, col, (void (*)())FL_wpxor_U8) |
The macro XORs a polyline as described in the draw_polyline() function with the image's underlying grey values and writes the result to the position.
draw_polylinex() is a macro which calls draw_polyline() with basic function FL_wpxor_U8() as an argument.
#define ellipsed | ( | a, | |
c | |||
) | ellipse(a, c, (void (*)())FL_wpset_U8) |
The macro draws the contour of an ellipse like described in the ellipse() function.
ellipsed() is a macro which calls ellipse() with basic function FL_wpset_U8() as an argument.
#define ellipsex | ( | a, | |
c | |||
) | ellipse(a, c, (void (*)())FL_wpxor_U8) |
The macro XORs the contour of an ellipse like described in the ellipse() function with the image's underlying grey values and writes the result to the position.
ellipsex() is a macro which calls ellipse() with basic function FL_wpxor_U8() as an argument.
#define draw_histod | ( | Graph, | |
Histo, | |||
size, | |||
BackgndColor, | |||
Color, | |||
i32Mode | |||
) | draw_histo(Graph, Histo, size, BackgndColor, Color, i32Mode, (void (*)())FL_wpset_U8) |
The macro draws a histogram like described in the draw_histo() function.
draw_histod() is a macro which calls draw_histo() with basic function FL_wpset_U8() as an argument.
#define draw_histox | ( | Graph, | |
Histo, | |||
size, | |||
BackgndColor, | |||
Color, | |||
i32Mode | |||
) | draw_histo(Graph, Histo, size, BackgndColor, Color, i32Mode, (void (*)())FL_wpxor_U8) |
The macro XORs a histogram like described in the draw_histo() function with the image's underlying grey values and writes the result to the position.
draw_histod() is a macro which calls draw_histo() with basic function FL_wpxor_U8() as an argument.
#define vc_draw_edgecontours_d | ( | img, | |
xyList, | |||
nr, | |||
col, | |||
subpixelIff1 | |||
) | vc_draw_edgecontours_( img, xyList, nr, col, subpixelIff1, (void (*)())FL_wpset_U8) |
The macro draws edgecontours like described in the vc_draw_edgecontours_() function.
vc_draw_edgecontours_d() is a macro which calls vc_draw_edgecontours_() with basic function FL_wpset_U8() as an argument.
#define framed | ( | a, | |
col | |||
) | frame(a, col, (void (*)())FL_wpset_U8) |
#define framex | ( | a, | |
col | |||
) | frame(a, col, (void (*)())FL_wpxor_U8) |
#define dframed | ( | a, | |
col | |||
) | dframe(a, col, (void (*)())FL_wpset_U8) |
#define dframex | ( | a, | |
col | |||
) | dframe(a, col, (void (*)())FL_wpxor_U8) |
#define markerd | ( | a, | |
col | |||
) | marker(a, col, (void (*)())FL_wpset_U8) |
#define markerx | ( | a, | |
col | |||
) | marker(a, col, (void (*)())FL_wpxor_U8) |
#define dmarkerd | ( | a, | |
col | |||
) | dmarker(a, col, (void (*)())FL_wpset_U8) |
The macro draws a double width marker like described in the dmarker() function.
dmarkerd() is a macro which calls dmarker() with basic function FL_wpset_U8() as an argument.
#define dmarkerx | ( | a, | |
col | |||
) | dmarker(a, col, (void (*)())FL_wpxor_U8) |
The macro XORs a double width marker like described in the dmarker() function with the image's underlying grey values and writes the result to the position.
dmarkerx() is a macro which calls dmarker() with basic function FL_wpxor_U8() as an argument.
The function draws a line in normalized floatingpoint form in an image variable. The clipping area for the drawing is defined by the size of the image variable. The drawing method is given by the rendering function func()
. The line is defined as: .
a | Points to Image Variable. |
cx,cy | Vector Normal to Line. |
b | Line Distance from Origin. |
col | Drawing Color. |
func | Function for Drawing. |
Macro Call | func() |
---|---|
vc_draw_lined(a, cx, cy, b, c) | Set Pixel to Value c . |
vc_draw_vclined(a, line, c) | Set Pixel to Value c . |
vc_draw_linex(a, cx, cy, b, c) | XOR Pixel with c . |
vc_draw_vclinex(a, line, c) | XOR Pixel with c . |
ERR_PARAM | If the Line does not cross the Image Field at all. |
ERR_NONE | On Success. |
I32 vc_line_restrict_to_image | ( | image * | a, |
I32 | x0, | ||
I32 | y0, | ||
I32 | x1, | ||
I32 | y1, | ||
I32 * | x0Rstr, | ||
I32 * | y0Rstr, | ||
I32 * | x1Rstr, | ||
I32 * | y1Rstr | ||
) |
The function restricts line coordinates given to fit an image given.
a | Pointer to Image Variable. |
x0,y0,x1,y1 | Coordinates of the line to be restricted. |
x0Rstr,y0Rstr,x1Rstr,y1Rstr | Restricted Coordinates. |
ERR_NONE | iff Output Coordinates can be used. |
The function draws a line in video memory, or more precisely in the image variable a
. The line begins at coordinate (x1
, y1
) and ends at coordinate (x2
,y2
), whereby both coordinates relate to the origin (upper left corner) of image variable a
. The line can be drawn normally, or as XOR in the gray image or in the overlay.
The drawing stops at the boundary of the image variable.
If the image variable a
is part of a larger image variable, then of course going beyond the bounds of the memory area does not cause a problem. col
is the gray scale to be drawn. The nature of drawing is specified by passing the pointer (* func
)() to the drawing function itself. The following macros use this function: lined(), linex().
a | Pointer to Image Variable. |
x0,y0 | Co-ordinates of First Point. |
x1,y1 | Co-ordinates of Second Point. |
col | Line Color. |
func | Drawing Function. |
x2-x1
)
,abs(y2-y1
)}+1
) Bytes of Heap Memory void chprint | ( | char * | str, |
image * | a, | ||
int | cx, | ||
int | cy | ||
) |
The function outputs the string passed by s
to the image variable a
. An 8×8 matrix is used for the character set. cx
and cy
are the width and height of the characters in multiples of 8 pixels. The characters are displayed in white (gray scale 255) on a black background (gray scale 0). If the passed string cannot be displayed in the specified image variable, then it will be truncated to the displayable length. No such check is made in the vertical direction.
This function is mostly used for displaying information on the screen.
void chprint1 | ( | char * | str, |
image * | a, | ||
int | cx, | ||
int | cy, | ||
int | v | ||
) |
The function outputs the string passed by s
to the image variable a
. An 8×8 matrix is used for the character set. cx
and cy
are the width and height of the characters in multiples of 8 pixels. The characters are displayed in the gray value given by v
on a black background (gray scale 0). If the passed string cannot be displayed in the specified image variable, then it will be truncated to the displayable length. No such check is made in the vertical direction.
This function is mostly used for displaying information on the screen.
str | The String to be Drawn. |
a | Output Image. |
cx,cy | Height of Character, Multiplied by 8 px. |
v | Grey Value of the text chars (0-255). |
I32 chprint_centered_at_pos_lines | ( | image * | img, |
char * | acStr, | ||
I32 | x, | ||
I32 | y, | ||
I32 | cx, | ||
I32 | cy, | ||
I32 | col, | ||
I32 | lineNr, | ||
I32 | linesTotal | ||
) |
The function outputs the string passed by acStr
to the image variable img
centered at the position (x
,y
). One can apply this function multiple times with the same linesTotal
and the lineNr
starting at 0 to draw multiple lines of text centered at the position. With appropriate settings for lineNr
and linesTotal
one can generate a subtitling. If the string exceeds the image, the function tries to move the text into the image to display it completely. If this fails, an the error ERR_BOUNDS occurs. If lineNr
or linesTotal
is out of range the error ERR_PARAM is raised. An 8×8 matrix is used for the character set. cx
and cy
are the width and height of the characters in multiples of 8 pixels. The characters are displayed by using the function chprint1().
void chprint_4x6 | ( | image * | img, |
char * | pText, | ||
int | chars, | ||
char | uppercasingIff1, | ||
unsigned char | colTxt, | ||
int | colBg | ||
) |
The function outputs the string passed by pText
to the image variable img
, each char has only 4x6 pixels. You can convert all chars to uppercase for better readability.
pText | The String to be Drawn. |
img | Output Image. |
uppercasingIff1 | Automatically use uppercase chars for lowercase ones. |
colTxt | Text color |
colBg | Background color, not set iff smaller than zero. |
void chprint_4x6_select | ( | image * | img, |
int | entries, | ||
char | uppercasingIff1, | ||
unsigned char | colTxt, | ||
int | colBg, | ||
int | highlightEntryIdx, | ||
unsigned char | colHighlightTxt, | ||
int | colHighlightBg, | ||
int | selectEntryIdx, | ||
unsigned char | colSelectTxt, | ||
int | colSelectBg, | ||
unsigned char | colBothTxt, | ||
int | colBothBg, | ||
... | |||
) |
The function outputs strings of the variable list to the image variable img
, each char has only 4x6 pixels. You can convert all chars to uppercase for better readability. If the entry index (starting at 0) fits the highlightEntryIdx or the selectEntryIdx, the defined colors are used (selectEntryIdx overrules highlightEntryIdx).
img | Output Image. |
entries | Number of passed strings. |
uppercasingIff1 | Automatically use uppercase chars for lowercase ones. |
colTxt | Normal Text color |
colBg | Normal Background color, not set iff smaller than zero. |
highlightEntryIdx,colHighlightTxt,colHighlightBg | 'highlight' entry index and colors |
selectEntryIdx,colHighlightTxt,colHighlightBg | 'select' entry index and colors |
colBothBg,colBothTxt | 'select' and 'highlight' fall together |
... | The Strings to be Drawn, they are cast to (char *) |
The function draws a box with dx
x dy
pixels and the grey value col
.
The function draws a solid box with dx
x dy
pixels and the grey value col
.
The function draws a cross with 2* Size
pixels and the grey value Color
.
void vc_draw_polygon | ( | image * | psImgOut, |
U32 | u32CornerCount, | ||
I32 * | pi32PxLst, | ||
I32 | col, | ||
void(*)() | func | ||
) |
The function draws a polygon in the image pointed by psImgOut
. The line can be drawn normally, or as XOR in the gray image or using dotted or other styles.
The drawing stops at the boundary of the image variable.
The nature of drawing is specified by passing the pointer (* func
)() to the drawing function itself. The following macros use this function: vc_draw_polygond(), vc_draw_polygonx().
psImgOut | Pointer to Image Variable. |
u32CornerCount | Corner Count for the Polygon. |
pi32PxLst | List of u32CornerCount Point Coordinates as Pixel List [I32 P1x, I32 P1y, I32 P2x, ...]. |
col | Contour Color. |
func | Drawing Function, eg. dashed_U8(). |
I32 fill_polygon_simple | ( | image * | psImgOut, |
U8 | color, | ||
U32 | u32CornerCount, | ||
I32 * | pi32PxLst, | ||
U8 | u8FillBackgroundIff1 | ||
) |
ERR_PARAM | if (u32CornerCount < 3) |
ERR_NONE | on Success. |
ERR_RLCFMT | if Internal RLC Generation fails. |
ERR_SLC | if Internal SLC Generation fails. |
ERR_RLCFMT | if Internal RLC Cutting fails. |
ERR_RLCFMT | if Internal RLC Cutting Frame fails. |
ERR_BOUNDS | if RLC Pixel Output fails. |
ERR_MEMORY | if Memory Allocation fails. |
void draw_polyline | ( | image * | psImgOut, |
U32 | u32CornerCount, | ||
I32 * | pi32PxLst, | ||
I32 | col, | ||
void(*)() | func | ||
) |
The function draws a polyline in the image pointed by psImgOut
. The line can be drawn normally, or as XOR in the gray image or using dotted or other styles.
The drawing stops at the boundary of the image variable.
The nature of drawing is specified by passing the pointer (* func
)() to the drawing function itself. The following macros use this function: draw_polylined(), draw_polylinex().
psImgOut | Pointer to Image Variable. |
u32CornerCount | Corner Count of the Polyline. |
pi32PxLst | List of u32CornerCount Point Coordinates as Pixel List [I32 P1x, I32 P1y, I32 P2x, ...]. |
col | Contour Color. |
func | Drawing Function, eg. dashed_U8(). |
The function draws a circle with radius rad
and center point (px
, py
) in an image variable. The clipping area for the drawing is defined by the size of the image variable. The drawing method is given by the rendering function func()
.
a | Image Variable used for drawing the Circle. |
px,py | Center Point for Circle. |
rad | Circle Radius. |
col | Circle Grey Value. |
(*func)() | Drawing Function. |
Macro Call | func() |
---|---|
vc_draw_circled(a, px, py, r, c) | Set Pixel to Value c . |
vc_draw_circlex(a, px, py, r, c) | XOR Pixel with c . |
rad
) Bytes of Heap Memory. ERR_MEMORY | If Memory Allocation failed. |
ERR_NONE | On Success. |
void ellipse | ( | image * | a, |
int | col, | ||
void(*)() | func | ||
) |
The function draws an ellipse in video memory, or more precisely in the image variable a
. The ellipse fills the image variables, i.e. the ellipse is centered and the horizontal and vertical diameter are equal to the horizontal and vertical size of the image variable. The ellipse can be drawn normally, or as XOR in the gray image or in the overlay.
The parameter col
is the gray scale to be drawn. The nature of drawing is specified by passing the pointer (*func
)() to the drawing function itself. The following macros use this function: ellipsed(), ellipsex(), ellipseo(), ellipsez().
I32 draw_histo | ( | image * | Graph, |
U32 * | Histo, | ||
I32 | size, | ||
I32 | BackgndColor, | ||
I32 | Color, | ||
I32 | i32Mode, | ||
void(*)() | func | ||
) |
The function draws a histogram within an image given by an image variable. Depending on the number of histogram bins specified by size
, the function tries to fit the histogram into the horizontal and vertical size of the image. The maximum of all histogram bins is calculated and the histogram is sized so that the histogram maximum will fit the image height.
Horizontally, it would be a good idea to have an image with a size of dx being a multiple of the number of bins, size
. If not so, the image is scaled to the actual size and some of the bins will be slightly wider or less wide than others by one pixel.
The histogram can be drawn in different modes, starting with the background color BackgndColor
. For a value of -1, the function does not set the background at all. Also available are the normal and the XOR drawing mode, set by using the respective basic function for drawing (see table). Finally, with i32Mode
the user can choose between candlestick display or function diagram mode, where the negative walues of i32Mode
will add a reference greyscale chart below the histogram.
Operation | Call | Basic function |
---|---|---|
draws histogram in given color | draw_histod(Graph, Histo, size, BackgndColor, Color, i32Mode) | FL_wpset_U8() |
XORs histogram within an image | draw_histox(Graph, Histo, size, BackgndColor, Color, i32Mode) | FL_wpxor_U8() |
i32Mode | mode of operation |
---|---|
>= 0 | draw greyscale below histogram |
< 0 | no greyscale |
+/- 1 | candlestick histogram |
+/- 2 | connect histogram values with lines |
Graph | Image variable (IMAGE_GREY) for histogram output. |
Histo | The histogram data. |
size | Size of the histogram (number of bins). |
BackgndColor | Background Color, -1 = no background setting. |
Color | Color for histogram, XOR with background if Color < 0. |
i32Mode | Mode, see table |
func | function pointer for drawing routines, see available macros |
The function draws a line at the given quantile at a histogram drawing generated by the function draw_histo() or one of its macros.
pOut | Image variable (IMAGE_GREY) for histogram output. |
pu32Histo | The histogram data. |
u8Percentage | the quantile to be drawn. |
u8Color | Color for line at quantile, XOR with background if Color < 0. |
The function draws a line at a given grey value at a histogram drawing generated by the function draw_histo() or one of its macros.
pOut | Image variable (IMAGE_GREY) for histogram output. |
u8Column | the grey value to be drawn. |
u8Color | Color for line at quantile, XOR with background if Color < 0. |
I32 vc_draw_edgecontours_ | ( | image * | img, |
I32 * | xyList, | ||
I32 | nr, | ||
I32 | col, | ||
I8 | subpixelIff1, | ||
void(*)() | func | ||
) |
The function draws all edgecontours in video memory, or more precisely in the image variable img
.
The drawing stops at the boundary of the image variable.
If the image variable a
is part of a larger image variable, then of course going beyond the bounds of the memory area does not cause a problem. col
is the gray scale to be drawn. The nature of drawing is specified by passing the pointer (* func
)() to the drawing function itself. The following macros use this function: lined(), linex().
img | Pointer to Image Variable. |
xyList | Edgecontour List obtained by subpixel_edgecontour() or edgecontours_from_edgeimage(). |
col | Edgecontours Color, cycles by number per edgecontour if negative, starting by 0; to see each contour in color cycle, fill a background color first which does not be a multiple of -col. |
func | Drawing Function. |
void frame | ( | image * | a, |
int | col, | ||
void(*)() | func | ||
) |
The function draws a frame in video memory, or more precisely in the image variable a
. The frame is drawn precisely on the margin of the image variable, i.e., in the first and last lines, and in the first and last columns of the image variables. The frame can be drawn normally, or as XOR in the gray image or in the overlay. The nature of drawing is specified by passing the pointer (* func
)() to the drawing function itself. The following macros use this function: framed(a, col), framex(a, col), frameo(a), framez(a).
void dframe | ( | image * | a, |
int | col, | ||
void(*)() | func | ||
) |
The function draws a frame in video memory, or more precisely in the image variable a
. The frame is drawn with a width of 2 pixels. The frame is drawn precisely on the margin of the image variable, i.e., in the lines 0, 1, dx-1
and dx-2
, as well as in columns 0,1,dy-1
and dy-2
. The frame can be drawn normally, or as XOR in the gray image or in the overlay. The nature of drawing is specified by passing the pointer (*func
)() to the drawing function itself. The following macros use this function: dframed(a, col), dframex(a, col), dframeo(a), dframez(a).
void marker | ( | image * | a, |
int | col, | ||
void(*)() | func | ||
) |
The function draws a marker in video memory, or more precisely in the image variable a
. The marker is drawn centered at the image variable. The marker can be drawn normally, or as XOR in the gray image or in the overlay. The nature of drawing is specified by passing the pointer (* func
)() to the drawing function itself. The following macros use this function: markerd(), markerx(), markero(), markerz().
void dmarker | ( | image * | a, |
int | col, | ||
void(*)() | func | ||
) |
The function draws a marker in video memory, or more precisely in the image variable a
. The marker is drawn with a width of 2 pixels. The marker is drawn centered at the image variable. The marker can be drawn normally, or as XOR in the gray image or in the overlay. The nature of drawing is specified by passing the pointer (*func
)() to the drawing function itself. For the available basic functions there are macros which make it easier to call the function. The following macros use this function: dmarkerd(), dmarkerx(), dmarkero(), dmarkerz().
I32 vc_image_fill_small_regions | ( | image * | imgIn, |
image * | imgOut, | ||
I32 | chn, | ||
I32 | lowthr, | ||
I32 | hithr, | ||
I32 | labelMethod, | ||
I32 | minPixel, | ||
U32 | col | ||
) |
The function fills all objects of the source image with an area less than min_area
with the given color value col
. This function can be used to filter out noise and to speed up following routines. The function is intended to eliminate small objects.
imgIn | Input image. |
imgOut | Output image, may be identical to imgIn . |
chn | Channel number to operate on (st==0,ccmp1==1,ccmp2==2). |
lowthr,hithr | Region defining grey value range based on rlcmk2(). |
labelMethod | Region defining connectedness based on rlc_label(). |
minPixel | Regions of area lower than this value will be colored. |
The function only draws on the first six of every ten addresses at the pixel list, which will lead to a dashed line if used with the function line(). You may try to use this function with other functions which make use of the base drawing functions, but it is not guaranteed that the result looks always good.
count | ad_list [] Entries. |
ad_list | Address Positions to Draw. |
value | Value (0-255) to set to Address Positions. |
The function only draws on every fourth address at the pixel list, which will lead to a dotted line if used with the function line(). You may try to use this function with other functions which make use of the base drawing functions, but it is not guaranteed that the result looks always good.
count | ad_list [] Entries. |
ad_list | Address Positions to Draw. |
value | Value (0-255) to set to Address Positions. |
The function only draws on every second address at the pixel list, which will lead to a narrow dotted line if used with the function line(). You may try to use this function with other functions which make use of the base drawing functions, but it is not guaranteed that the result looks always good.
count | ad_list [] Entries. |
ad_list | Address Positions to Draw. |
value | Value (0-255) to set to Address Positions. |
The function creates a list of coordinates which creates the (x, y) coordinates for all pixels on a line. The line begins at the origin (0,0) and ends at the point (dx
, dy
). This routine creates a list of (x, y) coordinates which are stored starting at the memory address specified by the pointer xy
. The list contains x-coordinates and y-coordinates in an alternating order. The function returns the number of generated line points minus 1.
The return value of the function is the number of coordinates created.
I32 EllipseXY | ( | int | a, |
int | b, | ||
int * | xyc | ||
) |
The function creates a list of coordinates which creates the (x,y) coordinates for a quarter of an ellipse. a
and b
are the two half axes of the ellipse, the ellipse is centered at the origin (0,0). The function only outputs positive values for x and y. This routine creates a list of (x,y) coordinates which are stored starting at the memory address specified by the pointer xyc
. The list contains first each x-coordinate and then the y-coordinate, respectively. The list should have a size of max(a
,b
) to assure proper operation. The return value of the function is the number of coordinates created.
The function performs window-clipping for the (x, y) coordinates in the pixellist. The coordinates are copied from xy_src
to xy_dst
, if they are in a rectangle defined by x_min
, x_max
, y_min
and y_max
, i.e. (x_min
<= x < x_max
) and (y_min
<= y < y_max
) It is allowed to use the function in-place, i.e. xy_dst
= xy_src
.
N | Count of Coordinates in xy_src |
xy_src | Source Pixellist. |
xy_dst | Destination Pixellist. |
x_min,x_max,y_min,y_max | Borders, see Text. |
Count | Count of Coordinates in the result list xy_dst . |
The function performs a translation operation for the (x, y) coordinates in the pixellist xy_src
. The vector (mx
, my
) is added to all coordinates, the result is written to xy_dst
. It is allowed to use the function in-place, i.e. xy_dst
= xy_src
.
N | Count of Coordinates in xy_src and xy_dst . |
xy_src | Source Pixellist. |
xy_dst | Destination Pixellist. |
mx,my | Translation. |
The function performs a translation operation for the (x, y) coordinates in the pixellist xy_src
. The vector (mx
, my
) is added to all coordinates, then each component is scaled by its respective scale value sx
or sy
, the result is written to xy_dst
. It is allowed to use the function in-place, i.e. xy_dst
= xy_src
.
N | Count of Coordinates in xy_src and xy_dst . |
xy_src | Source Pixellist. |
xy_dst | Destination Pixellist. |
mx,my | Translation. |
sx,sy | Scale. |
I32 rlc_fill_polygons_simple | ( | U16 * | rlc, |
U16 | rlcDx, | ||
U16 | rlcDy, | ||
U32 | rlcMaxBytes, | ||
U32 | lstCnt, | ||
I32 * | xyLst, | ||
U32 * | xyCnt | ||
) |
ERR_MEMORY | if allocation fails. |
ERR_PARAM | if polygon generation fails. |
positive | if polygon exceeds image. |
I32 IntersectionPoints | ( | image * | a, |
float | cx, | ||
float | cy, | ||
float | b, | ||
I32 * | X0, | ||
I32 * | Y0, | ||
I32 * | X1, | ||
I32 * | Y1 | ||
) |
This function calculates two intersection points between a line and the boundaries of an image variable given. The intersection points are calculated in the following order: Left, Right, Top, Bottom. The line is parameterized in a normalized vector form as: (cx
* x) + (cy
* y) - b
= 0.
a | Pointer to Image Variable. |
cx,cy,b | Line Parameters. |
X0,Y0 | Coordinates of First Intersection Point. |
X1,Y1 | Coordinates of Second Intersection Point. |
ERR_PARAM | If Less than 2 Points Found. |
ERR_NONE | On Success. |
I32 IntersectionPointsWithRect | ( | float | cx, |
float | cy, | ||
float | b, | ||
F32 | xMin, | ||
F32 | yMin, | ||
F32 | xMax, | ||
F32 | yMax, | ||
F32 * | X0, | ||
F32 * | Y0, | ||
F32 * | X1, | ||
F32 * | Y1 | ||
) |
This function calculates two intersection points between a line and a boundary rectangle. The intersection points are calculated in the following order: Left, Right, Top, Bottom. The line is parameterized in a normalized vector form as: (cx
* x) + (cy
* y) - b
= 0.
xMin,yMin,xMax,yMax | Boundary rectangle. |
cx,cy,b | Line Parameters. |
X0,Y0 | Coordinates of First Intersection Point. |
X1,Y1 | Coordinates of Second Intersection Point. |
ERR_PARAM | If Less than 2 Points Found. |
ERR_NONE | On Success. |