Draws antialiased lines of various styles.
Definition in file aaLine.cpp.
#include "aaLine.h"
#include <iostream>

Go to the source code of this file.
Defines | |
| #define | PLOTX(x, y, c1, c2) |
| Draw AA line fragment (x-direction). | |
| #define | PLOTY(x, y, c1, c2) |
| Draw AA line fragment (y-direction). | |
| #define | PLOTCX(x, y, c1, c2) |
| Draw coloured AA line fragment (x-direction). | |
| #define | PLOTCY(x, y, c1, c2) |
| Draw coloured AA line fragment (y-direction). | |
| #define | PLOTCSY(x, y, c1, c2) |
| Draw coloured stroked AA line fragment (x-direction). | |
| #define | PLOTCSX(x, y, c1, c2) |
| Draw coloured stroked AA line fragment (y-direction). | |
Functions | |
| int | ipart (double x) |
| Return interger part. | |
| double | fpart (double x) |
| Return fractional part. | |
| double | rfpart (double x) |
| Return 1.0-fractional part. | |
| void | sub (unsigned char &ch, unsigned char val) |
| Return smaller of two values. | |
| void | aaline (unsigned char *data, int stride, int x1, int x2, float y1, float y2) |
| Draws greyscale antialiased line. | |
| void | aacolline (unsigned char *data, int stride, int x1, int x2, float y1, float y2, unsigned char r, unsigned char g, unsigned char b) |
| Draws colour antialiased line. | |
| void | aacolstrokeline (unsigned char *data, int stride, int x1, int x2, float y1, float y2, FXColor c, int stroke, int w, int h) |
| Draws colour stroked antialiased line. | |
| void | aarampcolstrokeline (unsigned char *data, int stride, int x1, int x2, float y1, float y2, FXColor sc, FXColor ec, int stroke, int w, int h) |
| Draws gradient coloured stroked antialiased line. | |
| void aacolline | ( | unsigned char * | data, | |
| int | stride, | |||
| int | x1, | |||
| int | x2, | |||
| float | y1, | |||
| float | y2, | |||
| unsigned char | r, | |||
| unsigned char | g, | |||
| unsigned char | b | |||
| ) |
Draws colour antialiased line.
Draw colour antialiased line between coordinate points.
| data | Data to draw line to. | |
| stride | Width of data array. | |
| x1 | Starting x pixel. | |
| x2 | Ending x pixel. | |
| y1 | Starting y pixel. | |
| y2 | Ending y pixel. | |
| r | Red intensity. | |
| g | Green intensity. | |
| b | Blue intensity. |
Definition at line 213 of file aaLine.cpp.
| void aacolstrokeline | ( | unsigned char * | data, | |
| int | stride, | |||
| int | x1, | |||
| int | x2, | |||
| float | y1, | |||
| float | y2, | |||
| FXColor | c, | |||
| int | stroke, | |||
| int | w, | |||
| int | h | |||
| ) |
Draws colour stroked antialiased line.
Draw colour antialiased line with set thickness between coordinate points.
| data | Data to draw line to. | |
| stride | Width of data array. | |
| x1 | Starting x pixel. | |
| x2 | Ending x pixel. | |
| y1 | Starting y pixel. | |
| y2 | Ending y pixel. | |
| c | Colour. | |
| stroke | Line width. | |
| w | Width of drawing area (for clipping). | |
| h | Height of drawing area (for clipping). |
Definition at line 308 of file aaLine.cpp.
Referenced by GreyLabWindow::cmdLSRedraw(), and GreyLabWindow::renderObjects().

| void aaline | ( | unsigned char * | data, | |
| int | stride, | |||
| int | x1, | |||
| int | x2, | |||
| float | y1, | |||
| float | y2 | |||
| ) |
Draws greyscale antialiased line.
Draw greyscale antialiased line between coordinate points.
| data | Data to draw line to. | |
| stride | Width of data array. | |
| x1 | Starting x pixel. | |
| x2 | Ending x pixel. | |
| y1 | Starting y pixel. | |
| y2 | Ending y pixel. |
Definition at line 131 of file aaLine.cpp.
| void aarampcolstrokeline | ( | unsigned char * | data, | |
| int | stride, | |||
| int | x1, | |||
| int | x2, | |||
| float | y1, | |||
| float | y2, | |||
| FXColor | sc, | |||
| FXColor | ec, | |||
| int | stroke, | |||
| int | w, | |||
| int | h | |||
| ) |
Draws gradient coloured stroked antialiased line.
Draw antialiased line with set thickness between coordinate points, interpolating the colour between the ends.
| data | Data to draw line to. | |
| stride | Width of data array. | |
| x1 | Starting x pixel. | |
| x2 | Ending x pixel. | |
| y1 | Starting y pixel. | |
| y2 | Ending y pixel. | |
| sc | Start colour. | |
| ec | End colour. | |
| stroke | Line width. | |
| w | Width of drawing area (for clipping). | |
| h | Height of drawing area (for clipping). |
Definition at line 376 of file aaLine.cpp.
Referenced by GreyLabWindow::cmdLSRedraw().

1.5.3