GDrawingSurface is an abstract superclass for types that allow drawing shapes and pixels onto themselves as a pixel background layer. More...
#include "gdrawingsurface.h"
Public Member Functions | |
void | clear()=0 |
Erases any pixel data from the drawing surface. More... | |
void | conditionalRepaint() |
Repaints the interactor only if its contents have changed. More... | |
void | conditionalRepaintRegion(int x, int y, int width, int height) |
Repaints the given region of the interactor only if its contents have changed. More... | |
void | conditionalRepaintRegion(const GRectangle &bounds) |
Repaints the given region of the interactor only if its contents have changed. More... | |
void | draw(GObject *gobj)=0 |
Draws the given graphical object onto the background pixel layer of this interactor. More... | |
void | draw(GObject *gobj, double x, double y) |
Draws the given graphical object onto the background pixel layer of this interactor, moving it to the given x/y location first. More... | |
void | draw(GObject &gobj) |
Draws the given graphical object onto the background pixel layer of this interactor. More... | |
void | draw(GObject &gobj, double x, double y) |
Draws the given graphical object onto the background pixel layer of this interactor, moving it to the given x/y location first. More... | |
void | drawArc(double x, double y, double width, double height, double start, double sweep) |
Draws an unfilled arc with the given attributes onto the background pixel layer of this interactor in the current color. More... | |
void | drawImage(string filename, double x=0, double y=0) |
Draws an image loaded from the given file name onto the background pixel layer of this interactor at the given x/y location. More... | |
void | drawLine(const GPoint &p0, const GPoint &p1) |
Draws a line between the given two points onto the background pixel layer of this interactor at the given x/y location in the current color. More... | |
void | drawLine(double x0, double y0, double x1, double y1) |
Draws a line between the given two points onto the background pixel layer of this interactor at the given x/y location in the current color. More... | |
void | drawOval(const GRectangle &bounds) |
Draws an unfilled oval with the given bounding box onto the background pixel layer of this interactor at the given x/y location in the current color. More... | |
void | drawOval(double x, double y, double width, double height) |
Draws an unfilled oval with the given bounding box onto the background pixel layer of this interactor at the given x/y location in the current color. More... | |
void | drawPixel(double x, double y) |
Colors the given x/y pixel of the background layer of this interactor using the interactor's current color. More... | |
void | drawPixel(double x, double y, int color) |
Colors the given x/y pixel of the background layer of this interactor using the given color. More... | |
void | drawPixel(double x, double y, string color) |
Colors the given x/y pixel of the background layer of this interactor using the given color. More... | |
GPoint | drawPolarLine(const GPoint &p0, double r, double theta) |
Draws a line using polar coordinates onto the background pixel layer of this interactor in the current color. More... | |
GPoint | drawPolarLine(double x0, double y0, double r, double theta) |
Draws a line using polar coordinates onto the background pixel layer of this interactor in the current color. More... | |
void | drawPolygon(std::initializer_list< double > coords) |
Draws an unfilled polygon containing the given points onto the background pixel layer of this interactor in the current color. More... | |
void | drawPolygon(std::initializer_list< GPoint > points) |
Draws an unfilled polygon containing the given points onto the background pixel layer of this interactor in the current color. More... | |
void | drawRect(const GRectangle &bounds) |
Draws an unfilled rectangle of the given dimensions onto the background pixel layer of this interactor in the current color. More... | |
void | drawRect(double x, double y, double width, double height) |
Draws an unfilled rectangle of the given dimensions onto the background pixel layer of this interactor in the current color. More... | |
void | drawString(string text, double x, double y) |
Draws a text string onto the background pixel layer of this interactor at the given x/y location in the current font and color. More... | |
void | fillArc(double x, double y, double width, double height, double start, double sweep) |
Draws a filled arc with the given attributes onto the background pixel layer of this interactor in the current color and fill color. More... | |
void | fillOval(const GRectangle &bounds) |
Draws a filled oval with the given bounding box onto the background pixel layer of this interactor at the given x/y location in the current color and fill color. More... | |
void | fillOval(double x, double y, double width, double height) |
Draws a filled oval with the given bounding box onto the background pixel layer of this interactor at the given x/y location in the current color and fill color. More... | |
void | fillPolygon(std::initializer_list< double > coords) |
Draws a filled polygon containing the given points onto the background pixel layer of this interactor in the current color and fill color. More... | |
void | fillPolygon(std::initializer_list< GPoint > coords) |
Draws a filled polygon containing the given points onto the background pixel layer of this interactor in the current color and fill color. More... | |
void | fillRect(const GRectangle &bounds) |
Draws a filled rectangle of the given dimensions onto the background pixel layer of this interactor in the current color and fill color. More... | |
void | fillRect(double x, double y, double width, double height) |
Draws a filled rectangle of the given dimensions onto the background pixel layer of this interactor in the current color and fill color. More... | |
int | getARGB(double x, double y) const |
Returns the pixel color data at the given x/y location, retaining alpha-channel transparency in the top 8 bits. More... | |
string | getBackground() const |
Returns the current background color of the interactor as a string. More... | |
int | getBackgroundInt() const |
Returns the current background color of the interactor as an RGB integer. More... | |
string | getColor() const |
Returns the current foreground outline color of the interactor as a string. More... | |
int | getColorInt() const |
Returns the current foreground outline color of the interactor as an RGB integer. More... | |
string | getFillColor() const |
Returns the current fill color of the interactor as a string. More... | |
int | getFillColorInt() const |
Returns the current fill color of the interactor as an RGB integer. More... | |
string | getFont() const |
Returns the current text font of the interactor as a font string. More... | |
string | getForeground() const |
Returns the current foreground outline color of the interactor as a string. More... | |
int | getForegroundInt() const |
Returns the current foreground outline color of the interactor as an RGB integer. More... | |
GObject::LineStyle | getLineStyle() const |
Returns the current line style which will be used to draw outlines of shapes and lines. More... | |
double | getLineWidth() const |
Returns the thickness used when drawing outlines of shapes and lines. More... | |
int | getPixel(double x, double y) const =0 |
Returns the color of the pixel at the given x/y coordinates of the background layer of the interactor as an integer such as 0xff00cc. More... | |
int | getPixelARGB(double x, double y) const =0 |
Returns the color of the pixel at the given x/y coordinates of the background layer of the interactor as an integer such as 0xffff00cc. More... | |
std::vector< std::vector< int > > | getPixels() const =0 |
Returns all pixels of the surface as a nested STL vector of vectors, where the first index represents the x value and the second index represents the y value. More... | |
std::vector< std::vector< int > > | getPixelsARGB() const =0 |
Returns all pixels of the background layer of the surface as a nested STL vector of vectors, where the first index represents the x value and the second index represents the y value. More... | |
int ** | getPixelsArray() const =0 |
Returns all pixels of the surface as a heap-allocated 2D array, where the first index represents the x value and the second index represents the y value. More... | |
int ** | getPixelsArrayARGB() const =0 |
Returns all pixels of the background layer of the surface as a heap-allocated 2D array, where the first index represents the x value and the second index represents the y value. More... | |
string | getPixelString(double x, double y) const |
Returns the color of the pixel at the given x/y coordinates of the image as a string such as "#ff00cc". More... | |
int | getRGB(double x, double y) const |
Returns the color of the pixel at the given x/y coordinates of the background layer of the interactor as an integer such as 0xff00cc. More... | |
string | getRGBString(double x, double y) const |
Returns the color of the pixel at the given x/y coordinates of the background layer of the interactor as a color string such as "#ff00cc". More... | |
bool | isAutoRepaint() const |
Returns true if the interactor should repaint itself automatically whenever any change is made to its graphical data. More... | |
bool | isRepaintImmediately() const |
Returns true if the interactor should repaint itself automatically whenever any change is made to its graphical data. More... | |
void | repaint()=0 |
Instructs the interactor to redraw itself on the screen. More... | |
void | repaintRegion(int x, int y, int width, int height)=0 |
Instructs the interactor to repaint the given region of pixel data. More... | |
void | repaintRegion(const GRectangle &bounds) |
Instructs the interactor to repaint the given region of pixel data. More... | |
void | setAutoRepaint(bool autoRepaint) |
Sets whether the interactor should repaint itself automatically whenever any change is made to its graphical data. More... | |
void | setBackground(int color) |
Sets the current background color of the interactor as an RGB integer. More... | |
void | setBackground(string color) |
Sets the current background color of the interactor as a string. More... | |
void | setColor(int color) |
Sets the current foreground outline color of the interactor as as RGB integer. More... | |
void | setColor(string color) |
Sets the current foreground outline color of the interactor as a string. More... | |
void | setFillColor(int color) |
Sets the current fill color of the interactor as an RGB integer. More... | |
void | setFillColor(string color) |
Returns the current fill color of the interactor as a string. More... | |
void | setFont(string font) |
Sets the current text font of the interactor as a font string. More... | |
void | setForeground(int color) |
Sets the current foreground outline color of the interactor as an RGB integer. More... | |
void | setForeground(string color) |
Sets the current foreground outline color of the interactor as a string. More... | |
void | setLineStyle(GObject::LineStyle lineStyle) |
Sets the current line style which will be used to draw outlines of shapes and lines. More... | |
void | setLineWidth(double lineWidth) |
Sets the thickness used when drawing outlines of shapes and lines. More... | |
void | setPixel(double x, double y, int rgb)=0 |
Sets the color of the given x/y pixel in the background layer of the interactor to the given RGB values. More... | |
void | setPixel(double x, double y, int r, int g, int b) |
Sets the color of the given x/y pixel in the background layer of the interactor to the given RGB values. More... | |
void | setPixel(double x, double y, string color) |
Sets the color of the given x/y pixel in the background layer of the interactor to the given color. More... | |
void | setPixelARGB(double x, double y, int argb)=0 |
Sets the color of the given x/y pixel in the background layer of the interactor to the given ARGB value. More... | |
void | setPixelARGB(double x, double y, int a, int r, int g, int b) |
Sets the color of the given x/y pixel in the background layer of the interactor to the given ARGB value. More... | |
void | setPixels(int **pixels, int width=-1, int height=-1)=0 |
Sets the color of the all pixels in the background layer of the interactor to the given RGB values, where the first index represents the x-coordinate and the second index represents the y-coordinate. More... | |
void | setPixels(const std::vector< std::vector< int >> &pixels)=0 |
Sets the color of the all pixels in the background layer of the interactor to the given RGB values, where the first index represents the x-coordinate and the second index represents the y-coordinate. More... | |
void | setPixelsARGB(int **pixelsARGB, int width=-1, int height=-1)=0 |
Sets the color of the all pixels in the background layer of the interactor to the given ARGB values, where the first index represents the x-coordinate and the second index represents the y-coordinate. More... | |
void | setPixelsARGB(const std::vector< std::vector< int >> &pixelsARGB)=0 |
Sets the color of the all pixels in the background layer of the interactor to the given ARGB values, where the first index represents the x-coordinate and the second index represents the y-coordinate. More... | |
void | setRepaintImmediately(bool autoRepaint) |
Sets whether the interactor should repaint itself automatically whenever any change is made to its graphical data. More... | |
void | setRGB(double x, double y, int rgb) |
Sets the color of the given x/y pixel in the background layer of the interactor to the given RGB values. More... | |
void | setRGB(double x, double y, int r, int g, int b) |
Sets the color of the given x/y pixel in the background layer of the interactor to the given RGB values. More... | |
void | setRGB(double x, double y, string color) |
Sets the color of the given x/y pixel in the background layer of the interactor to the given color. More... | |
Protected Member Functions | |
GDrawingSurface() | |
~GDrawingSurface() | |
void | checkBounds(string member, double x, double y, double width, double height) const |
Throws an error if the given x/y values are out of bounds. More... | |
void | checkColor(string member, int rgb) const |
Throws an error if the given rgb value is not a valid color. More... | |
void | checkSize(string member, double width, double height) const |
Throws an error if the given width/height values are out of bounds. More... | |
void | initializeGObject(GObject &obj, bool filled=false) |
Initializes a new graphical object to be drawn. More... | |
void | initializeGObject(GObject *obj, bool filled=false) |
Initializes a new graphical object to be drawn. More... | |
Protected Attributes | |
bool | _autoRepaint |
string | _backgroundColor |
int | _backgroundColorInt |
string | _color |
int | _colorInt |
string | _fillColor |
int | _fillColorInt |
string | _font |
GDrawingSurface * | _forwardTarget |
GObject::LineStyle | _lineStyle |
double | _lineWidth |
GDrawingSurface is an abstract superclass for types that allow drawing shapes and pixels onto themselves as a pixel background layer.
This includes graphical canvas objects (GCanvas) as well as windows (GWindow).
|
protected |
|
protectedvirtual |
|
protected |
Throws an error if the given x/y values are out of bounds.
|
protected |
Throws an error if the given rgb value is not a valid color.
|
protected |
Throws an error if the given width/height values are out of bounds.
|
pure virtual |
|
virtual |
Repaints the interactor only if its contents have changed.
|
virtual |
Repaints the given region of the interactor only if its contents have changed.
|
virtual |
Repaints the given region of the interactor only if its contents have changed.
|
pure virtual |
Draws the given graphical object onto the background pixel layer of this interactor.
ErrorException | if the object is null |
Implemented in GCanvas.
|
virtual |
Draws the given graphical object onto the background pixel layer of this interactor, moving it to the given x/y location first.
ErrorException | if the object is null |
|
virtual |
Draws the given graphical object onto the background pixel layer of this interactor.
|
virtual |
Draws the given graphical object onto the background pixel layer of this interactor, moving it to the given x/y location first.
|
virtual |
Draws an unfilled arc with the given attributes onto the background pixel layer of this interactor in the current color.
See gobjects.h for explanation of GArc parameters.
|
virtual |
Draws an image loaded from the given file name onto the background pixel layer of this interactor at the given x/y location.
See gobjects.h for explanation of GImage parameters.
ErrorException | if the given file is not found or cannot be loaded as a valid image file |
Draws a line between the given two points onto the background pixel layer of this interactor at the given x/y location in the current color.
See gobjects.h for explanation of GLine parameters.
|
virtual |
Draws a line between the given two points onto the background pixel layer of this interactor at the given x/y location in the current color.
See gobjects.h for explanation of GLine parameters.
|
virtual |
Draws an unfilled oval with the given bounding box onto the background pixel layer of this interactor at the given x/y location in the current color.
See gobjects.h for explanation of GOval parameters.
|
virtual |
Draws an unfilled oval with the given bounding box onto the background pixel layer of this interactor at the given x/y location in the current color.
See gobjects.h for explanation of GOval parameters.
|
virtual |
Colors the given x/y pixel of the background layer of this interactor using the interactor's current color.
|
virtual |
Colors the given x/y pixel of the background layer of this interactor using the given color.
|
virtual |
Colors the given x/y pixel of the background layer of this interactor using the given color.
Draws a line using polar coordinates onto the background pixel layer of this interactor in the current color.
The line begins at the given x/y point and extends from there by the given angle and radius. Returns the end point opposite p0 where the line ends. See gobjects.h for explanation of GLine parameters.
|
virtual |
Draws a line using polar coordinates onto the background pixel layer of this interactor in the current color.
The line begins at the given x/y point and extends from there by the given angle and radius. Returns the end point where the line ends. See gobjects.h for explanation of GLine parameters.
|
virtual |
Draws an unfilled polygon containing the given points onto the background pixel layer of this interactor in the current color.
See gobjects.h for explanation of GPolygon parameters.
|
virtual |
Draws an unfilled polygon containing the given points onto the background pixel layer of this interactor in the current color.
See gobjects.h for explanation of GPolygon parameters.
|
virtual |
Draws an unfilled rectangle of the given dimensions onto the background pixel layer of this interactor in the current color.
See gobjects.h for explanation of GRect parameters.
|
virtual |
Draws an unfilled rectangle of the given dimensions onto the background pixel layer of this interactor in the current color.
See gobjects.h for explanation of GRect parameters.
|
virtual |
Draws a text string onto the background pixel layer of this interactor at the given x/y location in the current font and color.
See gobjects.h for explanation of GText parameters.
|
virtual |
Draws a filled arc with the given attributes onto the background pixel layer of this interactor in the current color and fill color.
See gobjects.h for explanation of GArc parameters.
|
virtual |
Draws a filled oval with the given bounding box onto the background pixel layer of this interactor at the given x/y location in the current color and fill color.
See gobjects.h for explanation of GOval parameters.
|
virtual |
Draws a filled oval with the given bounding box onto the background pixel layer of this interactor at the given x/y location in the current color and fill color.
See gobjects.h for explanation of GOval parameters.
|
virtual |
Draws a filled polygon containing the given points onto the background pixel layer of this interactor in the current color and fill color.
See gobjects.h for explanation of GPolygon parameters.
|
virtual |
Draws a filled polygon containing the given points onto the background pixel layer of this interactor in the current color and fill color.
See gobjects.h for explanation of GPolygon parameters.
|
virtual |
Draws a filled rectangle of the given dimensions onto the background pixel layer of this interactor in the current color and fill color.
See gobjects.h for explanation of GRect parameters.
|
virtual |
Draws a filled rectangle of the given dimensions onto the background pixel layer of this interactor in the current color and fill color.
See gobjects.h for explanation of GRect parameters.
|
virtual |
Returns the pixel color data at the given x/y location, retaining alpha-channel transparency in the top 8 bits.
|
virtual |
|
virtual |
|
virtual |
Returns the current foreground outline color of the interactor as a string.
This color will be used to draw the outlines of shapes drawn using the drawXxx and fillXxx methods, as well as being the default color used when calling setPixel or setRGB. See gcolor.h for more detail about color strings. Equivalent to getForeground.
|
virtual |
Returns the current foreground outline color of the interactor as an RGB integer.
This color will be used to draw the outlines of shapes drawn using the drawXxx and fillXxx methods, as well as being the default color used when calling setPixel or setRGB. See gcolor.h for more detail about colors. Equivalent to getForegroundInt.
|
virtual |
Returns the current fill color of the interactor as a string.
This color will appear in shapes drawn using the fillXxx methods. See gcolor.h for more detail about color strings.
|
virtual |
Returns the current fill color of the interactor as an RGB integer.
This color will appear in shapes drawn using the fillXxx methods. See gcolor.h for more detail about color strings.
|
virtual |
|
virtual |
Returns the current foreground outline color of the interactor as a string.
This color will be used to draw the outlines of shapes drawn using the drawXxx and fillXxx methods, as well as being the default color used when calling setPixel or setRGB. See gcolor.h for more detail about color strings. Equivalent to getColor.
|
virtual |
Returns the current foreground outline color of the interactor as an RGB integer.
This color will be used to draw the outlines of shapes drawn using the drawXxx and fillXxx methods, as well as being the default color used when calling setPixel or setRGB. See gcolor.h for more detail about colors. Equivalent to getColor.
|
virtual |
Returns the current line style which will be used to draw outlines of shapes and lines.
The default line style is a solid line (GObject::LINE_SOLID).
|
virtual |
Returns the thickness used when drawing outlines of shapes and lines.
The default thickness is 1.
|
pure virtual |
Returns the color of the pixel at the given x/y coordinates of the background layer of the interactor as an integer such as 0xff00cc.
Note that if you are planning to set many pixels in the background and want maximum performance, you should instead call getPixels to extract all pixels into a Grid, then manipulate all desired pixels in that Grid, then call setPixels to submit all of your changes.
Equivalent to getRGB.
ErrorException | if the given x/y values are out of bounds. |
Implemented in GCanvas.
|
pure virtual |
Returns the color of the pixel at the given x/y coordinates of the background layer of the interactor as an integer such as 0xffff00cc.
This differs from getPixel in that it explicitly retains and returns the alpha channel of the pixel in the top 8 bits, allowing for transparency effects.
Note that if you are planning to set many pixels in the background and want maximum performance, you should instead call getPixels to extract all pixels into a Grid, then manipulate all desired pixels in that Grid, then call setPixels to submit all of your changes.
ErrorException | if the given x/y values are out of bounds. |
Implemented in GCanvas.
|
pure virtual |
Returns all pixels of the surface as a nested STL vector of vectors, where the first index represents the x value and the second index represents the y value.
Implemented in GCanvas.
|
pure virtual |
Returns all pixels of the background layer of the surface as a nested STL vector of vectors, where the first index represents the x value and the second index represents the y value.
This differs from getPixels in that it explicitly retains and returns the alpha channel of each pixel in the top 8 bits, allowing for transparency effects.
Implemented in GCanvas.
|
pure virtual |
Returns all pixels of the surface as a heap-allocated 2D array, where the first index represents the x value and the second index represents the y value.
The caller is responsible for freeing the memory for this array using delete[].
Implemented in GCanvas.
|
pure virtual |
Returns all pixels of the background layer of the surface as a heap-allocated 2D array, where the first index represents the x value and the second index represents the y value.
This differs from getPixelsArray in that it explicitly retains and returns the alpha channel of each pixel in the top 8 bits, allowing for transparency effects. The caller is responsible for freeing the memory for this array using delete[].
Implemented in GCanvas.
|
virtual |
Returns the color of the pixel at the given x/y coordinates of the image as a string such as "#ff00cc".
The string that is returned comes from the GWindow
function convertRGBToColor
; see documentation of that function. Throws an error if the given x/y values are out of bounds.
|
virtual |
Returns the color of the pixel at the given x/y coordinates of the background layer of the interactor as an integer such as 0xff00cc.
Note that if you are planning to set many pixels in the background and want maximum performance, you should instead call getPixels to extract all pixels into a Grid, then manipulate all desired pixels in that Grid, then call setPixels to submit all of your changes.
Equivalent to getPixel.
ErrorException | if the given x/y values are out of bounds. |
|
virtual |
Returns the color of the pixel at the given x/y coordinates of the background layer of the interactor as a color string such as "#ff00cc".
Note that if you are planning to set many pixels in the background and want maximum performance, you should instead call getPixels to extract all pixels into a Grid, then manipulate all desired pixels in that Grid, then call setPixels to submit all of your changes.
ErrorException | if the given x/y values are out of bounds. |
|
protectedvirtual |
Initializes a new graphical object to be drawn.
Used as a convenience method to set the color, fill color, outline style, font, and other settings of graphical objects based on the settings of the drawing surface.
|
protectedvirtual |
Initializes a new graphical object to be drawn.
Used as a convenience method to set the color, fill color, outline style, font, and other settings of graphical objects based on the settings of the drawing surface.
|
virtual |
Returns true if the interactor should repaint itself automatically whenever any change is made to its graphical data.
But if you call setAutoRepaint(false), you must manually repaint the interactor to see any changes. This can be desirable if you plan to make a large batch of changes and want to repaint only after all of them are done. Equivalent to isRepaintImmediately.
Reimplemented in GCanvas.
|
virtual |
Returns true if the interactor should repaint itself automatically whenever any change is made to its graphical data.
But if you call setAutoRepaint(false), you must manually repaint the interactor to see any changes. This can be desirable if you plan to make a large batch of changes and want to repaint only after all of them are done. Equivalent to isAutoRepaint.
Reimplemented in GWindow.
|
pure virtual |
Instructs the interactor to redraw itself on the screen.
By default the interactor will automatically repaint itself whenever you make any change to its graphical data. But if you call setAutoRepaint(false), you must manually repaint the interactor to see any changes. This can be desirable if you plan to make a large batch of changes and want to repaint only after all of them are done.
Implemented in GCanvas.
|
pure virtual |
|
virtual |
Instructs the interactor to repaint the given region of pixel data.
This can be preferable to repaint() for performance purposes if you have made a small change that affects only the given rectangular region of the interactor.
|
virtual |
Sets whether the interactor should repaint itself automatically whenever any change is made to its graphical data.
By default this is true. But if you call setAutoRepaint(false), you must manually repaint the interactor to see any changes. This can be desirable if you plan to make a large batch of changes and want to repaint only after all of them are done. Equivalent to setRepaintImmediately.
Reimplemented in GCanvas.
|
virtual |
|
virtual |
|
virtual |
Sets the current foreground outline color of the interactor as as RGB integer.
This color will be used to draw the outlines of shapes drawn using the drawXxx and fillXxx methods, as well as being the default color used when calling setPixel or setRGB. See gcolor.h for more detail about color strings. Equivalent to setForeground.
Reimplemented in GCanvas.
|
virtual |
Sets the current foreground outline color of the interactor as a string.
This color will be used to draw the outlines of shapes drawn using the drawXxx and fillXxx methods, as well as being the default color used when calling setPixel or setRGB. See gcolor.h for more detail about color strings. Equivalent to setForeground.
Reimplemented in GCanvas.
|
virtual |
Sets the current fill color of the interactor as an RGB integer.
This color will appear in shapes drawn using the fillXxx methods. See gcolor.h for more detail about color strings.
|
virtual |
Returns the current fill color of the interactor as a string.
This color will appear in shapes drawn using the fillXxx methods. See gcolor.h for more detail about color strings.
|
virtual |
|
virtual |
Sets the current foreground outline color of the interactor as an RGB integer.
This color will be used to draw the outlines of shapes drawn using the drawXxx and fillXxx methods, as well as being the default color used when calling setPixel or setRGB. See gcolor.h for more detail about color strings. Equivalent to setColor.
Reimplemented in GCanvas.
|
virtual |
Sets the current foreground outline color of the interactor as a string.
This color will be used to draw the outlines of shapes drawn using the drawXxx and fillXxx methods, as well as being the default color used when calling setPixel or setRGB. See gcolor.h for more detail about color strings. Equivalent to setColor.
Reimplemented in GCanvas.
|
virtual |
Sets the current line style which will be used to draw outlines of shapes and lines.
The default line style is a solid line (GObject::LINE_SOLID).
|
virtual |
Sets the thickness used when drawing outlines of shapes and lines.
The default thickness is 1.
|
pure virtual |
Sets the color of the given x/y pixel in the background layer of the interactor to the given RGB values.
Note that if you are planning to set many pixels in the background and want maximum performance, you should instead call getPixels to extract all pixels into a nested vector, then manipulate all desired pixels in that vector, then call setPixels to submit all of your changes. Equivalent to setRGB.
ErrorException | if x/y is out of range or rgb is an invalid color |
Implemented in GCanvas.
|
virtual |
Sets the color of the given x/y pixel in the background layer of the interactor to the given RGB values.
Note that if you are planning to set many pixels in the background and want maximum performance, you should instead call getPixels to extract all pixels into a nested vector, then manipulate all desired pixels in that vector, then call setPixels to submit all of your changes. Equivalent to setRGB.
ErrorException | if x/y is out of range or r,g,b are not between 0-255 |
Reimplemented in GCanvas.
|
virtual |
Sets the color of the given x/y pixel in the background layer of the interactor to the given color.
Note that if you are planning to set many pixels in the background and want maximum performance, you should instead call getPixels to extract all pixels into a nested vector, then manipulate all desired pixels in that vector, then call setPixels to submit all of your changes. Equivalent to setRGB.
ErrorException | if x/y is out of range |
|
pure virtual |
Sets the color of the given x/y pixel in the background layer of the interactor to the given ARGB value.
Note that if you are planning to set many pixels in the background and want maximum performance, you should instead call getPixelsARGB to extract all pixels into a nested vector, then manipulate all desired pixels in that vector, then call setPixelsARGB to submit all of your changes.
ErrorException | if x/y is out of range or argb is an invalid color |
Implemented in GCanvas.
|
virtual |
Sets the color of the given x/y pixel in the background layer of the interactor to the given ARGB value.
Note that if you are planning to set many pixels in the background and want maximum performance, you should instead call getPixelsARGB to extract all pixels into a nested vector, then manipulate all desired pixels in that vector, then call setPixelsARGB to submit all of your changes.
ErrorException | if x/y is out of range or a,r,g,b are not between 0-255 |
Reimplemented in GCanvas.
|
pure virtual |
Sets the color of the all pixels in the background layer of the interactor to the given RGB values, where the first index represents the x-coordinate and the second index represents the y-coordinate.
Any existing background layer pixels will be replaced. If the given array is not the same size as this interactor, the interactor will be resized to match the array.
Implemented in GCanvas.
|
pure virtual |
Sets the color of the all pixels in the background layer of the interactor to the given RGB values, where the first index represents the x-coordinate and the second index represents the y-coordinate.
Any existing background layer pixels will be replaced. If the given vector is not the same size as this interactor, the interactor will be resized to match the vector.
Implemented in GCanvas.
|
pure virtual |
Sets the color of the all pixels in the background layer of the interactor to the given ARGB values, where the first index represents the x-coordinate and the second index represents the y-coordinate.
Any existing background layer pixels will be replaced. If the given array is not the same size as this interactor, the interactor will be resized to match the array.
Implemented in GCanvas.
|
pure virtual |
Sets the color of the all pixels in the background layer of the interactor to the given ARGB values, where the first index represents the x-coordinate and the second index represents the y-coordinate.
Any existing background layer pixels will be replaced. If the given vector is not the same size as this interactor, the interactor will be resized to match the vector.
Implemented in GCanvas.
|
virtual |
Sets whether the interactor should repaint itself automatically whenever any change is made to its graphical data.
By default this is true. But if you call setAutoRepaint(false), you must manually repaint the interactor to see any changes. This can be desirable if you plan to make a large batch of changes and want to repaint only after all of them are done. Equivalent to setAutoRepaint.
|
virtual |
Sets the color of the given x/y pixel in the background layer of the interactor to the given RGB values.
Note that if you are planning to set many pixels in the background and want maximum performance, you should instead call getPixels to extract all pixels into a vector, then manipulate all desired pixels in that vector, then call setPixels to submit all of your changes. Equivalent to setPixel.
ErrorException | if x/y is out of range or rgb is an invalid color |
|
virtual |
Sets the color of the given x/y pixel in the background layer of the interactor to the given RGB values.
Note that if you are planning to set many pixels in the background and want maximum performance, you should instead call getPixels to extract all pixels into a vector, then manipulate all desired pixels in that vector, then call setPixels to submit all of your changes. Equivalent to setPixel.
ErrorException | if x/y is out of range or r,g,b are not between 0-255 |
|
virtual |
Sets the color of the given x/y pixel in the background layer of the interactor to the given color.
Note that if you are planning to set many pixels in the background and want maximum performance, you should instead call getPixels to extract all pixels into a vector, then manipulate all desired pixels in that vector, then call setPixels to submit all of your changes. Equivalent to setPixel.
ErrorException | if x/y is out of range |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |