MRaster lib 21.0.0.0
Image Processing Library
Loading...
Searching...
No Matches
mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > Class Template Reference

Class providing off-screen drawing functionality. More...

#include <ramCanvasTpl.hpp>

Classes

class  rcConverterColorScheme
 Colorize a ramCanvasTpl with integer channels using a color scheme. More...
 
class  rcConverterHomoBase
 This class is an incomplete rcConverter (no getPxColorNC method) that provides a nice base for homogenious rcConverters. More...
 
class  rcConverterIdentity
 
class  rcConverterMonoIntensity
 Convert a ramCanvasTpl to a greyscale image using colorT::intensity(). More...
 
class  rcConverterRGBAbyte
 
class  rcConverterRGBAdbl
 
class  rcConverterRGBbyte
 
class  rcConverterRGBdbl
 

Enumerations

enum class  realAxisOrientation { INVERTED , NATURAL }
 Enum for real axis orientation. More...
 
enum class  intAxisOrientation { INVERTED , NATURAL }
 Enum for integer axis orientation. More...
 
enum class  drawModeType {
  SET , XOR , ADDCLAMP , AND ,
  OR , DIFFCLAMP , MULTCLAMP
}
 Enum for drawing Mode. More...
 
enum class  interpolationType {
  BILINEAR , TRUNCATE , NEAREST , AVERAGE4 ,
  AVERAGE9
}
 Enum for drawing Mode. More...
 

Typedefs related to template parameters

typedef point2d< fltCrdT > pointFltType
 Real coordinate pair type.
 
typedef point2d< intCrdT > pointIntType
 Integer coordinate pair type.
 
typedef std::complex< fltCrdT > cplxFltType
 Real coordinate complex type (Provided for convince – not used in ramCanvasTpl)
 
typedef std::complex< intCrdT > cplxIntType
 Integer coordinate complex type (Provided for convince – not used in ramCanvasTpl)
 
typedef intCrdT coordIntType
 Integer type for coordinates.
 
typedef fltCrdT coordFltType
 Real type for coordinates.
 
typedef colorT colorType
 Color type for pixels.
 

Typedefs related to colorT

typedef colorT::channelType colorChanType
 colorT: Channel type
 
typedef colorT::maskType colorMaskType
 colorT: Mask type
 
typedef colorT::channelArithDType colorChanArithDType
 colorT: Channel arithmatic (Int: -)
 
typedef colorT::channelArithSPType colorChanArithSPType
 colorT: Channel arithmatic (Int: +*)
 
typedef colorT::channelArithSDPType colorChanArithSDPType
 colorT: Channel arithmatic (Int: +-*)
 
typedef colorT::channelArithFltType colorChanArithFltType
 colorT: Channel arithmatic (Flt: +-*)
 
typedef colorT::channelArithLogType colorChanArithLogType
 colorT: Channel arithmatic (Int: ^|&~)
 
typedef colorT::colorSpaceEnum colorSpaceEnum
 colorT: Color spaces
 
typedef colorT::cornerColorEnum colorCornerEnum
 colorT: RGB Color Corners
 
typedef colorT::colorArgType colorArgType
 colorT: Argument passing type
 
typedef colorT::colorPtrType colorPtrType
 colorT: Pointer to color
 
typedef colorT::colorRefType colorRefType
 colorT: Ref to a color
 
typedef colorT::colorCRefType colorCRefType
 colorT: Const Ref to a color
 
typedef colorT::csIntType csIntType
 colorT: Color Scheme Integer Type
 
typedef colorT::csFltType csFltType
 colorT: Color Scheme Float Type
 
typedef colorT::csNatType csNatType
 colorT: Color Scheme Natural Type
 
typedef colorT::cmfInterpolationEnum cmfInterpolationEnum
 colorT: Interpolation for color match functions
 

Iterator Typedefs

typedef colorT * pixelIterator
 pixel store iterators
 
typedef colorT * iterator
 pixel store iterators
 

Private Enumerations

enum class  endianType { BIG , LITTLE , AUTO }
 Endianness Identifiers. More...
 

Logical Maximum for intCrdT values

static const intCrdT intCrdMax = (1ul << ((sizeof(intCrdT)*CHAR_BIT-1)/2)) - 3
 maximum for numPixX, numPixY, & numPix.
 

intCrd Guard Valus

static const intCrdT intCrdGrdMax = intCrdMax+1
 Large sentinel value (always off canvas)
 
static const intCrdT intCrdGrdMin = -1
 Small sentinel value (always off canvas)
 

Canvas integer coordinates

intCrdT numPixX
 Number of x pixels.
 
intCrdT numPixY
 Number of y pixels.
 
intCrdT numPix
 Number of pixels.
 

Canvas real coordinates

fltCrdT minRealX
 x coord of min (real coord)
 
fltCrdT maxRealX
 x coord of max (real coord)
 
fltCrdT minRealY
 y coord of min (real coord)
 
fltCrdT maxRealY
 y coord of max (real coord)
 

Canvas real/integer coordinates conversion

fltCrdT pixWidX
 Width of a pixel (real coord)
 
fltCrdT pixWidY
 Height of a pixel (real coord)
 
fltCrdT canvasWidX
 Width of the canvas (real coord)
 
fltCrdT canvasWidY
 height of the canvas (real coord)
 

Axis orientation

realAxisOrientation realAxOrientationX
 Orientation of x axis.
 
realAxisOrientation realAxOrientationY
 Orientation of y axis.
 
intAxisOrientation intAxOrientationX
 Flip horizontally.
 
intAxisOrientation intAxOrientationY
 Flip vertically.
 

Canvas pixel store pointers

colorT * pixels
 Array to hold the color values.
 
colorT * pixelsE
 Point one beyond end of pixels array.
 

Drawing defaults

colorT dfltColor
 Default color.
 
drawModeType drawMode
 Drawing mode.
 
intCrdT dfltX
 x coordinate used by default.
 
intCrdT dfltY
 y coordinate used by default.
 

Filled Triangle Utility Functions

void drawFillTriangleUtl (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT x3, intCrdT y3, colorT c1, colorT c2, colorT c3, bool solid)
 Utliity function behind the drawFillTriangle() functions.
 

File Writing Utility Methods

void writeUIntToStream (std::ostream &oStream, endianType endianness, int numBytes, uint64_t data)
 Write an unsigned integer to a stream with given length and endianness.
 
endianType platformEndianness ()
 Determine the platform's endianness.
 

Coordinate System Manipulation (i)

void updRealCoords ()
 Several internal parameters are maintained within this class that make conversion between real coordinates and integer coordinate very fast.
 
void newIntCoordsNC (intCrdT numPixX_p, intCrdT numPixY_p)
 Change the logical coordinate sizes.
 

Plane Manipulation Methods

void reallocCanvas (intCrdT numPixX_p, intCrdT numPixY_p)
 Destroy the current pixel memory and reallocate a new pixel space of the given size.
 
void freeCanvas ()
 Free the pixel memory (i)
 
void rePointPixels (colorT *new_pixels, intCrdT new_numPixX, intCrdT new_numPixY)
 Points the pixels pointer at a new pixel store, and updates coordinates.
 

Various helper functions

void triangleEdger (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT *pts, bool findMin)
 Used to find the left and right edges of a triangle.
 

Raster Data Import And Export.

int exportRasterData (void *&rasterData, intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, int redChan, int greenChan, int blueChan, int alphaChan)
 Extract raster data from the image, and pack it into a typical form used by imaging applications.
 

Constructors & Assignment Operators

 ramCanvasTpl ()
 No arg constructor.
 
 ramCanvasTpl (const ramCanvasTpl &theCanvas)
 Copy constructor.
 
 ramCanvasTpl (intCrdT numPixX_p, intCrdT numPixY_p, fltCrdT minRealX_p=-1, fltCrdT maxRealX_p=1, fltCrdT minRealY_p=-1, fltCrdT maxRealY_p=1)
 Most commonly used constructor.
 
 ramCanvasTpl (ramCanvasTpl &&theCanvas)
 Move constructor.
 
ramCanvasTploperator= (ramCanvasTpl &&theCanvas)
 Move assignment operator.
 

Destructor

 ~ramCanvasTpl ()
 Destructor deallocates memory for the canvas.
 

Canvas Compositing

Warning
These functions are experimental! Functionality and API are likely to change in the future.
void adjoinCanvasRight (const ramCanvasTpl &theCanvas)
 Adjoin the canvas to the side of the current canvas.
 
void adjoinCanvasLeft (const ramCanvasTpl &theCanvas)
 Adjoin the canvas to the side of the current canvas.
 
void adjoinCanvasBottom (const ramCanvasTpl &theCanvas)
 Adjoin the canvas to the side of the current canvas.
 
void adjoinCanvasTop (const ramCanvasTpl &theCanvas)
 Adjoin the canvas to the side of the current canvas.
 
void insertCanvas (const ramCanvasTpl &theCanvas, intCrdT x1=0, intCrdT y1=0)
 Draw the given canvas at the indicated point.
 

Canvas resize and crop

void resizeCanvas (intCrdT new_numPixX_p, intCrdT new_numPixY_p)
 Resize the canvas to the given size.
 
void expandCanvas (intCrdT new_numPixX_p, intCrdT new_numPixY_p, intCrdT x1=0, intCrdT y1=0, colorArgType color=colorT(colorT::minChanVal))
 Expand the current canvas.
 
void cropCanvas (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2)
 This function will crop the canvas to the given rectangular region.
 

Coordinate System Manipulation

void newRealCoords (fltCrdT minRealX_p, fltCrdT maxRealX_p, fltCrdT minRealY_p, fltCrdT maxRealY_p)
 Change the real coordinate system associated with a canvas.
 

Canvas comparison

bool isSameSize (ramCanvasTpl const &inRC) const
 Return true if given canvas and current canvas are the same size.
 
bool isNotSameSize (ramCanvasTpl const &inRC) const
 Return true if given canvas and current canvas are NOT the same size.
 
bool isClose (ramCanvasTpl const &inRC, colorChanType epsilon) const
 Return true if corresponding pixels in each canvas are "close" as defined by colorTpl::isClose().
 
bool isEqual (ramCanvasTpl const &inRC) const
 Return true if corresponding pixels in each canvas are "equal" as defined by colorTpl::isEqual().
 

Canvas Rotation and Reflection.

void rotate90CW ()
 Loss-less 90 degree clockwise rotation of the canvas about the center.
 
void rotate90CCW ()
 Loss-less 90 degree counter clockwise rotation of the canvas about the center.
 
void rotate180 ()
 Loss-less 180 degree rotation of the canvas about the center.
 
void flipHorz ()
 Loss-less, horizontal flip of the canvas about the center.
 
void flipVert ()
 Loss-less, vertical flip of the canvas about the center.
 
void flipTranspose ()
 Loss-less, vertical flip of the canvas about the center.
 

Canvas Scaling.

void scaleUpProximal (int xfactor)
 Scale up the image using proximal interpolation.
 
void scaleDown1pt (int xfactor)
 Scale down using only the upper left pixel from each block.
 
void scaleDownMax (int xfactor)
 Scale down using only the pixel with maximum luminosity in each block.
 
void scaleDownMean (int xfactor)
 Scale down using the mean pixel value from each block.
 

Geometric transformations (Reverse Mapping)

Warning
These functions are experimental! Functionality and API are likely to change in the future.
ramCanvasTpl geomTfrmRevRPoly (std::vector< double > const &RPoly, double rScale, double Xo, double Yo, double oScale, colorArgType errorColor=colorCornerEnum::GREEN, interpolationType interpMethod=interpolationType::BILINEAR)
 Geometric Transform via Radial Polynomial implemented with Reverse Mapping.
 
ramCanvasTpl geomTfrmRevBiPoly (std::vector< double > const &BiPolyX, std::vector< double > const &BiPolyY, double Xo, double Yo, double oScale, colorArgType errorColor=colorCornerEnum::GREEN, interpolationType interpMethod=interpolationType::BILINEAR)
 Geometric Transform via bivariate polynomial implemented with Reverse Mapping.
 
ramCanvasTpl geomTfrmRevAff (std::vector< double > const &HAMatrix, double Xo, double Yo, double oScale, colorArgType errorColor=colorCornerEnum::GREEN, interpolationType interpMethod=interpolationType::BILINEAR)
 Homogenious Affine Geometric Transform implemented with Reverse Mapping.
 
ramCanvasTpl geomTfrmRevArb (mjr::point2d< double >(*f)(double, double), double Xo, double Yo, double oScale, colorArgType errorColor=colorCornerEnum::GREEN, interpolationType interpMethod=interpolationType::BILINEAR)
 Geometric Transform via provided mapping function implemented with Reverse Mapping.
 

Apply Convolution

void convolution (double *kernel, int kWide, int kTall, double divisor)
 Apply a convolution filter.
 
void convolution (double *kernel, int kSize, double divisor)
 
void convolution (double *kernel, int kSize)
 

Compute Convolution Kernels

void computeConvolutionMatrixGausian (double *kernel, int kSize, double sd)
 Compute a Gaussian convolution kernel (use with divisor==1.0).
 
void computeConvolutionMatrixBox (double *kernel, int kSize)
 Compute a box blur convolution kernel (use with divisor==1.0).
 

Iterators

colorT * begin ()
 
colorT * end ()
 

Functional Homogeneous Pixel Transformations (point operators)

void applyHomoPixTfrm (colorT &(colorT::*HPT)())
 Apply a homogeneous pixel transformation.
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(double), double)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(double, double), double, double)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(double, double, double), double, double, double)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(double, double, double, double), double, double, double, double)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(double, double, double, double, double), double, double, double, double, double)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(double, double, double, double, double, double), double, double, double, double, double, double)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(int), int)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(int, int), int, int)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(int, int, int), int, int, int)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(int, int, int, int), int, int, int, int)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(colorT), colorT)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(colorT, colorT), colorT, colorT)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(colorT, colorT, colorT), colorT, colorT, colorT)
 
void applyHomoPixTfrm (colorT &(colorT::*HPT)(colorT, colorT, colorT, colorT), colorT, colorT, colorT, colorT)
 

Predefined Homogeneous Pixel Transformations (point operators)

void autoHistStrech ()
 Computes a linear grey level scale homogeneous pixel transformation.
 
void autoMaxHistStrechRGB ()
 Computes a, possibly different, linear grey level scale homogeneous pixel transformation on each channel of the image.
 

Canvas Combination Functions

void combineRamCanvasBinOp (colorT &(colorT::*HPT)(colorT), const ramCanvasTpl &theCanvas, intCrdT trgX=0, intCrdT trgY=0, intCrdT wide=-1, intCrdT tall=-1, intCrdT srcX=0, intCrdT srcY=0)
 This function takes a ramCanvasTpl and combines it with the current ramCanvasTpl using the provided binary operator.
 

Statistical Canvas Combination Functions (useful for CCD imaging)

void combineRamCanvasMean (ramCanvasTpl *theCanvasList, const int N)
 Take a list of ramCanvasTpl objects and combine them with the current ramCanvasTpl using mean.
 

Canvas Clearing Methods

void clrCanvasToBlack ()
 Clear the canvas to black.
 
void clrCanvasToWhite ()
 Clear the canvas to black.
 
void clrCanvasChannelToMin (int chan)
 Set the given channel to the minimum value.
 
void clrCanvasChannelToMax (int chan)
 Set the given channel to the maximum value.
 
void clrCanvas ()
 Clear the canvas.
 
void clrCanvas (colorArgType color)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Default Point Methods

void moveTo (intCrdT x, intCrdT y)
 Set the current default point to the given coordinates.
 
void moveTo (fltCrdT x, fltCrdT y)
 
void moveTo (pointIntType thePoint)
 
void moveTo (pointFltType thePoint)
 

Default Color Methods

void setDfltColor (colorArgType color)
 Set the default color.
 
void setDfltColor (std::string cornerColor)
 
void setDfltColor (const char *cornerColor)
 
void setDfltColor (colorChanType r, colorChanType g, colorChanType b)
 

Point drawing functions

void drawPoint (intCrdT x, intCrdT y, colorArgType color)
 Draw a point at the specified coordinates with the specified color.
 
void drawPoint ()
 
void drawPoint (colorArgType color)
 
void drawPoint (intCrdT x, intCrdT y)
 
void drawPoint (fltCrdT x, fltCrdT y)
 
void drawPoint (fltCrdT x, fltCrdT y, colorArgType color)
 
void drawPoint (pointIntType thePoint, colorArgType color)
 
void drawPoint (pointIntType thePoint)
 
void drawPoint (pointFltType thePoint)
 
void drawPoint (pointFltType thePoint, colorArgType color)
 

Line Drawing Methods

void drawLine (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, colorArgType color)
 Draw a line.
 
void drawLine (pointFltType point1)
 
void drawLine (pointFltType point1, colorArgType color)
 
void drawLine (pointIntType point1)
 
void drawLine (pointIntType point1, colorArgType color)
 
void drawLine (pointFltType point1, pointFltType point2)
 
void drawLine (pointFltType point1, pointFltType point2, colorArgType color)
 
void drawLine (pointIntType point1, pointIntType point2)
 
void drawLine (pointIntType point1, pointIntType point2, colorArgType color)
 
void drawLine (intCrdT x, intCrdT y)
 
void drawLine (fltCrdT x, fltCrdT y)
 
void drawLine (intCrdT x, intCrdT y, colorArgType color)
 
void drawLine (fltCrdT x, fltCrdT y, colorArgType color)
 
void drawLine (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2)
 
void drawLine (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2)
 
void drawLine (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, colorArgType color)
 

Unfilled Triangle Drawing Methods

void drawTriangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT x3, intCrdT y3, colorArgType color)
 Draw an un-filled triangle.
 
void drawTriangle (pointIntType *thePoints, colorArgType color)
 
void drawTriangle (pointFltType *thePoints)
 
void drawTriangle (pointFltType *thePoints, colorArgType color)
 
void drawTriangle (pointIntType *thePoints)
 
void drawTriangle (pointIntType point1, pointIntType point2, pointIntType point3)
 
void drawTriangle (pointFltType point1, pointFltType point2, pointFltType point3)
 
void drawTriangle (pointFltType point1, pointFltType point2, pointFltType point3, colorArgType color)
 
void drawTriangle (pointIntType point1, pointIntType point2, pointIntType point3, colorArgType color)
 
void drawTriangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, fltCrdT x3, fltCrdT y3)
 
void drawTriangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, fltCrdT x3, fltCrdT y3, colorArgType color)
 
void drawTriangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT x3, intCrdT y3)
 

Filled Triangle Drawing Methods

void drawFillTriangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT x3, intCrdT y3, colorArgType color)
 Draw a triangle filled with a solid color using a nicely optimized, horizontal scan conversion algorithm.
 
void drawFillTriangle (pointIntType *thePoints, colorArgType color)
 
void drawFillTriangle (pointFltType *thePoints)
 
void drawFillTriangle (pointFltType *thePoints, colorArgType color)
 
void drawFillTriangle (pointIntType *thePoints)
 
void drawFillTriangle (pointIntType point1, pointIntType point2, pointIntType point3)
 
void drawFillTriangle (pointFltType point1, pointFltType point2, pointFltType point3)
 
void drawFillTriangle (pointFltType point1, pointFltType point2, pointFltType point3, colorArgType color)
 
void drawFillTriangle (pointIntType point1, pointIntType point2, pointIntType point3, colorArgType color)
 
void drawFillTriangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, fltCrdT x3, fltCrdT y3)
 
void drawFillTriangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, fltCrdT x3, fltCrdT y3, colorArgType color)
 
void drawFillTriangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT x3, intCrdT y3)
 

Shaded Triangle Drawing Methods

void drawFillTriangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, intCrdT x3, intCrdT y3, colorArgType color1, colorArgType color2, colorArgType color3)
 Draw a filled triangle using barycentric color interpolation.
 

Unfilled Rectangle Drawing Functions

void drawRectangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, colorArgType color)
 Draw an unfilled rectangle with diagonal corners located at (x1, y1) and and (x2, y2).
 
void drawRectangle (pointIntType point1, pointIntType point2, colorArgType color)
 
void drawRectangle (pointIntType point1, pointIntType point2)
 
void drawRectangle (pointFltType point1, pointFltType point2, colorArgType color)
 
void drawRectangle (pointFltType point1, pointFltType point2)
 
void drawRectangle (pointIntType *thePoints, colorArgType color)
 
void drawRectangle (pointFltType *thePoints)
 
void drawRectangle (pointFltType *thePoints, colorArgType color)
 
void drawRectangle (pointIntType *thePoints)
 
void drawRectangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2)
 
void drawRectangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, colorArgType color)
 
void drawRectangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2)
 

Filled Rectangle Drawing Methods

void drawFillRectangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2, colorArgType color)
 Draw a filled rectangle with diagonal corners located at (x1, y1) and and (x2, y2).
 
void drawFillRectangle (pointIntType point1, pointIntType point2, colorArgType color)
 
void drawFillRectangle (pointIntType point1, pointIntType point2)
 
void drawFillRectangle (pointFltType point1, pointFltType point2, colorArgType color)
 
void drawFillRectangle (pointFltType point1, pointFltType point2)
 
void drawFillRectangle (pointIntType *thePoints, colorArgType color)
 
void drawFillRectangle (pointFltType *thePoints)
 
void drawFillRectangle (pointFltType *thePoints, colorArgType color)
 
void drawFillRectangle (pointIntType *thePoints)
 
void drawFillRectangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2)
 
void drawFillRectangle (fltCrdT x1, fltCrdT y1, fltCrdT x2, fltCrdT y2, colorArgType color)
 
void drawFillRectangle (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2)
 

Unfilled Circle Drawing Methods

void drawCircle (intCrdT centerX, intCrdT centerY, intCrdT radiusX, colorArgType color)
 Draw an un-filled circle.
 
void drawCircle (intCrdT radiusX)
 
void drawCircle (fltCrdT radiusX)
 
void drawCircle (pointFltType centerPoint, fltCrdT radiusX)
 
void drawCircle (pointFltType centerPoint, fltCrdT radiusX, colorArgType color)
 
void drawCircle (pointIntType centerPoint, intCrdT radiusX)
 
void drawCircle (pointIntType centerPoint, intCrdT radiusX, colorArgType color)
 
void drawCircle (fltCrdT centerX, fltCrdT centerY, fltCrdT radiusX)
 
void drawCircle (fltCrdT centerX, fltCrdT centerY, fltCrdT radiusX, colorArgType color)
 
void drawCircle (intCrdT centerX, intCrdT centerY, intCrdT radiusX)
 

Filled Circle Drawing Methods

void drawFillCircle (intCrdT centerX, intCrdT centerY, intCrdT radiusX, colorArgType color)
 Draw an un-filled circle.
 
void drawFillCircle (fltCrdT radiusX)
 
void drawFillCircle (intCrdT radiusX)
 
void drawFillCircle (pointFltType centerPoint, fltCrdT radiusX, colorArgType color)
 
void drawFillCircle (pointFltType centerPoint, fltCrdT radiusX)
 
void drawFillCircle (pointIntType centerPoint, intCrdT radiusX, colorArgType color)
 
void drawFillCircle (pointIntType centerPoint, intCrdT radiusX)
 
void drawFillCircle (fltCrdT centerX, fltCrdT centerY, fltCrdT radiusX)
 
void drawFillCircle (fltCrdT centerX, fltCrdT centerY, fltCrdT radiusX, colorArgType color)
 
void drawFillCircle (intCrdT centerX, intCrdT centerY, intCrdT radiusX)
 

Piece-Wise Linear Curve Drawing Methods

void drawPLCurve (int numPoints, intCrdT *x, intCrdT *y, colorArgType color)
 Draw Piece-Wise Linear Curves.
 
void drawPLCurve (int numPoints, intCrdT *x, intCrdT *y)
 
void drawPLCurve (int numPoints, fltCrdT *x, fltCrdT *y, colorArgType color)
 
void drawPLCurve (int numPoints, fltCrdT *x, fltCrdT *y)
 
void drawPLCurve (int numPoints, pointIntType *thePoints, colorArgType color)
 
void drawPLCurve (int numPoints, pointIntType *thePoints)
 
void drawPLCurve (int numPoints, pointFltType *thePoints, colorArgType color)
 
void drawPLCurve (int numPoints, pointFltType *thePoints)
 

Hershey Glyph Rendering Utility Functions

void drawHersheyGlyph (int glyphNum, intCrdT x, intCrdT y, double magX, double magY, colorArgType aColor)
 Render a glyph from the Hershey character set.
 
void drawHersheyGlyph (int glyphNum, fltCrdT x, fltCrdT y, double magX, double magY, colorArgType aColor)
 

ASCII Character Rendering.

What are font rendering functions doing in a raster graphics library? Sometimes I like to put a label on image.

void drawString (std::string aString, mjr::hershey::font aFont, intCrdT x, intCrdT y, colorArgType aColor, double cex, intCrdT spc)
 Render a string using Hershey ASCII Fonts.
 
void drawString (std::string aString, mjr::hershey::font aFont, fltCrdT x, fltCrdT y, colorArgType aColor, double cex, intCrdT spc)
 
void drawStringBox (std::string aString, mjr::hershey::font aFont, intCrdT x, intCrdT y, colorArgType stringColor, colorArgType boxColor, double cex, intCrdT spc)
 Renders a filled, bounding box for the given string as rendered via drawString.
 
void drawStringBox (std::string aString, mjr::hershey::font aFont, fltCrdT x, fltCrdT y, colorArgType stringColor, colorArgType boxColor, double cex, intCrdT spc)
 

File Reading and Writing Methods

bool supportLibTIFF ()
 Is libTIFF supported – that is: will the readTIFFfile() method do anything? Note that readTIFFfile() is the only method that needs libTIFF.
 
int readTIFFfile (std::string fileName)
 If the libTIFF library was found at build time, this function will read a TIFF file into current ramCanvas object.
 
template<class rcConT >
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
int writeTIFFfile (std::string fileName, rcConT rcConverter, bool markAlpha)
 Write a TIFF format image file.
 
int writeTIFFfile (std::string fileName, bool markAlpha=true)
 Simplified overload for writeTIFFfile() that only requires the filename.
 
int writeTGAfile (std::string fileName)
 Write a 24-bit (8-bit per channel) RGB, TGA format graphics file.
 
int readRAWfile (std::string fileName)
 Read RAW file.
 
template<class rcConT >
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
int writeRAWfile (std::string fileName, rcConT rcConverter)
 Write a MJRRAW file.
 
int writeRAWfile (std::string fileName)
 Simplified overload for writeRAWfile() that only requires the filename.
 

Boolean Clip Test Methods

int isCliped (fltCrdT x, fltCrdT y) const
 Determine if the given point is within the bounds of the ramCanvasTpl.
 
int isCliped (intCrdT x, intCrdT y) const
 
int isOnCanvas (fltCrdT x, fltCrdT y) const
 Determine if the given point is within the bounds of the ramCanvasTpl.
 
int isOnCanvas (intCrdT x, intCrdT y) const
 

Coordinate Conversions.

intCrdT real2intX (fltCrdT x) const
 Convert real x coordinate to integral x coordinate.
 
intCrdT real2intY (fltCrdT y) const
 Convert real y coordinate to integral y coordinate.
 
fltCrdT int2realX (intCrdT x)
 Convert integral x coordinate to real x coordinate.
 
fltCrdT int2realY (intCrdT y)
 Convert integral y coordinate to real y coordinate.
 

Coordinate Pair Conversions.

pointFltType int2real (intCrdT x, intCrdT y)
 Convert real x & y coordinates to integer x & y coordinates.
 
pointIntType real2int (intCrdT x, intCrdT y)
 Convert integer x & y coordinates to real x & y coordinates.
 

Pixel Corner Coordinates.

Warning
These functions are experimental! Functionality and API are likely to change in the future.
pointFltType int2corner (intCrdT x, intCrdT y, int cornerX, int cornerY)
 Given integer x & y coordinates, produce real x & y coordinates for one of the pixel's corners.
 
pointFltType int2corner (intCrdT x, intCrdT y, int cornerIndex)
 Given integer x & y coordinates and a corner index, produce real x & y coordinates for one of the pixel's corners.
 

Coordinate Delta Conversions.

intCrdT realDelta2intX (fltCrdT x) const
 Convert real distance on the x coordinate axis to an integral distance.
 
intCrdT realDelta2intY (fltCrdT y) const
 Convert real distance on the y coordinate axis to an integral distance.
 
fltCrdT intDelta2realX (intCrdT x) const
 Convert integral distance on the x coordinate to a real distance.
 
fltCrdT intDelta2realY (intCrdT y) const
 Convert integral distance on the y coordinate to a real distance.
 

Orientation of Real Coordinate Systems

realAxisOrientation getRealAxOrientationX ()
 Get the real X axis orientation.
 
void setRealAxOrientationX (realAxisOrientation orientation)
 Set the real X axis orientation.
 
realAxisOrientation getRealAxOrientationY ()
 Get the real Y axis orientation.
 
void setRealAxOrientationY (realAxisOrientation orientation)
 Set the real Y axis orientation.
 
void setRealAxisDefaultOrientation ()
 Set the real axis orientation to default (NATURAL for both X and Y axes)
 

Drawing Mode

drawModeType getDrawMode ()
 Get the current drawing mode.
 
void setDrawMode (drawModeType newDrawMode)
 Set the current drawing mode NOOP if enableDrawModes is false.
 
void setDefaultDrawMode ()
 Set the default draw mode.
 

Orientation of Integer Coordinate Systems

intAxisOrientation getIntAxOrientationX ()
 Get the integer X axis orientation.
 
bool isIntAxOrientationNaturalX ()
 Is the integer X axis NATURAL?
 
void setIntAxOrientationX (intAxisOrientation orientation)
 Set the integer X axis orientation.
 
bool isIntAxOrientationNaturalY ()
 Get the integer Y axis orientation.
 
intAxisOrientation getIntAxOrientationY ()
 Is the integer Y axis orientation NATURAL?
 
void setIntAxOrientationY (intAxisOrientation orientation)
 Set the integer Y axis orientation.
 
void setIntAxisDefaultOrientation ()
 Set the integer axis orientation to default (NATURAL for both X and Y axes)
 

Accessor Methods

intCrdT getNumPixX () const
 
intCrdT getNumPixY () const
 
colorT * getPixels ()
 Returns a pointer to the raw pixel store.
 
colorT * clonePixels ()
 Return a clone (a copy) of the raw pixel store.
 

Real Coordinate Accessor Methods

fltCrdT getMinRealX ()
 x coord of min (real coord)
 
fltCrdT getMaxRealX ()
 x coord of max (real coord)
 
fltCrdT getMinRealY ()
 y coord of min (real coord)
 
fltCrdT getMaxRealY ()
 y coord of max (real coord)
 
fltCrdT getPixWidX ()
 Width of a pixel (real coord)
 
fltCrdT getPixWidY ()
 Height of a pixel (real coord)
 
fltCrdT getCanvasWidX ()
 Width of the display (real coord)
 
fltCrdT getCanvasWidY ()
 height of the display(real coord)
 
fltCrdT getCanvasWidD ()
 Width of the display (real coord)
 

Pixel Value Accessor Methods

colorT getPxColor (intCrdT x, intCrdT y) const
 Returns a copy of the color at the given coordinates.
 
colorT getPxColor (fltCrdT x, fltCrdT y) const
 
colorT getPxColor (pointIntType thePoint) const
 
colorT getPxColor (pointFltType thePoint) const
 

Pixel Value Accessor with Interpolation Methods

colorT getPxColorInterpolate (double x, double y, interpolationType interpMethod=interpolationType::BILINEAR)
 Returns the interpolated color value at the the given coordinates using the given interpolation method.
 
colorT getPxColorInterpBLin (double x, double y)
 Returns the bilinear interpolated color value at the the given coordinates.
 
colorT getPxColorInterpTrunc (double x, double y)
 Returns the truncated interpolated color value at the the given coordinates.
 
colorT getPxColorInterpNear (double x, double y)
 Returns the nearest neighbor interpolated color value at the the given coordinates.
 
colorT getPxColorInterpAvg4 (double x, double y)
 Returns the average 4 interpolated color value at the the given coordinates.
 
colorT getPxColorInterpAvg9 (double x, double y)
 Returns the average 9 interpolated color value at the the given coordinates.
 

NC stands for No Checks and No Clipping

void drawPointNC (intCrdT x, intCrdT y, colorArgType color)
 The functions here work in a similar way to the non-NC functions, but with no clipping or bounds checking.
 
colorT getPxColorNC (intCrdT x, intCrdT y) const
 Get the default point to the specified coordinates with no clipping or bounds checking.
 
colorT & getPxColorRefNC (intCrdT x, intCrdT y) const
 Returns a reference to the color object for the given pixel with no clipping or bounds checking.
 
void drawHorzLineNC (intCrdT xMin, intCrdT xMax, intCrdT yConst, colorArgType color)
 Draw a horizontal line with no clipping or bounds checking.
 
void drawVertLineNC (intCrdT yMin, intCrdT yMax, intCrdT xConst, colorArgType color)
 Draw a vertical line with no clipping or bounds checking.
 

S stands for Simple

void drawPointS (intCrdT x, intCrdT y, colorArgType color)
 Draw a point without any special drawing options.
 

Canvas Level Colorization.

These are tools designed to make things like escape time fractals very easy to create.

Warning
These functions are experimental! Functionality and API are likely to change in the future.
void colorizeFltCanvas (std::function< colorT(fltCrdT, fltCrdT)> cFun)
 
void colorizeFltCanvas (std::function< colorT(pointFltType)> cFun)
 
void colorizeIntCanvas (std::function< colorT(intCrdT, intCrdT)> cFun)
 
void colorizeIntCanvas (std::function< colorT(pointIntType)> cFun)
 

Canvas Level Statistical Computation.

intCrdT statNumNonZeroPixels (intCrdT x1, intCrdT y1, intCrdT x2, intCrdT y2)
 
intCrdT statNumNonZeroPixels ()
 

Detailed Description

template<class colorT, class intCrdT, class fltCrdT, bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
class mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >

Class providing off-screen drawing functionality.

This class essentially manages a 2D array of pixels (represented as colorTpl objects). Both integer and floating point coordinates are supported.

Coordinates

Traditional Mathematical Coordinate System

The traditional coordinate system used in mathematics is the Cartesian Coordinate system. In this system the axes represent real numbers which increase as one moves to the right or up.

                             ^ y (increasing upward)
                             |
                             . (0, 1)
                             |
                             |
                             |
                    (-1,0)   | (0,0)        x (increasing to the right)
                  <-.--------+--------.----->
                             |        (1,0)
                             |
                             |
                             |
                             . (0, -1)
                             |
                             v

Traditional Computer Graphics Coordinate System

Unlike the Cartesian coordinate system, the traditional coordinates used in computer graphics have only positive, integer coordinates, the origin at the upper left, and the x and y coordinates increasing to the right and down. This is a very natural choice given the discrete nature of digital displays and the typical layout of 2D arrays in RAM.

              (0,0)   +------------+ (numPixX-1, 0)
                      |            |
                      |            |
                      |            |
                      |            |
                      |            |
       (numPixY-1, 0) +------------+ (numPixX-1, numPixY-1)

ramCanvas Coordinate Systems

This library supports two sets of coordinates for each image:

  • Integer – much like traditional computer graphics coordinates
  • Floating Point – much like mathematical coordinates

The integer coordinates are a generalization of the traditional integer coordinates used for computer graphics. Like the traditional system, they are unsigned integers (so the coordinates start at 0), each pixel is one unit from the previous, and the maximum pixel coordinate is one minus the canvas size in that coordinate direction. The generalization is that the origin of the coordinate system can be any of the four corners. By default the origin is the lower, left corner. Note that the memory layout of the image is not modified by the integer coordinate system – i.e. the location of the origin is irrelevant when it comes to the layout of bits in RAM. In RAM the layout is the same as the traditional coordinate system where the coordinates are the indexes of the image array. What is the point? The location of the origin is taken into consideration when the image is exported/imported by functions like writeRAWfile.

Template Parameters
intCrdTAn integral type used for the integer image coordinates. Should be signed, and at least \( 4\cdot\log_2(\mathtt{numPixX} \cdot \mathtt{numPixY}) \) bits in size
colorTA type for the image pixels (a color)
fltCrdTA floating point type used for the floating point image coordinates
enableDrawModesIf true, enables drawing modes othe than drawModeType::SET.

Definition at line 141 of file ramCanvasTpl.hpp.

Member Typedef Documentation

◆ pointFltType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef point2d<fltCrdT> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pointFltType

Real coordinate pair type.

Definition at line 229 of file ramCanvasTpl.hpp.

◆ pointIntType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef point2d<intCrdT> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pointIntType

Integer coordinate pair type.

Definition at line 230 of file ramCanvasTpl.hpp.

◆ cplxFltType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef std::complex<fltCrdT> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::cplxFltType

Real coordinate complex type (Provided for convince – not used in ramCanvasTpl)

Definition at line 231 of file ramCanvasTpl.hpp.

◆ cplxIntType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef std::complex<intCrdT> mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::cplxIntType

Integer coordinate complex type (Provided for convince – not used in ramCanvasTpl)

Definition at line 232 of file ramCanvasTpl.hpp.

◆ coordIntType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::coordIntType

Integer type for coordinates.

Definition at line 233 of file ramCanvasTpl.hpp.

◆ coordFltType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::coordFltType

Real type for coordinates.

Definition at line 234 of file ramCanvasTpl.hpp.

◆ colorType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorType

Color type for pixels.

Definition at line 235 of file ramCanvasTpl.hpp.

◆ colorChanType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::channelType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanType

colorT: Channel type

Definition at line 241 of file ramCanvasTpl.hpp.

◆ colorMaskType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::maskType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorMaskType

colorT: Mask type

Definition at line 242 of file ramCanvasTpl.hpp.

◆ colorChanArithDType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::channelArithDType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithDType

colorT: Channel arithmatic (Int: -)

Definition at line 243 of file ramCanvasTpl.hpp.

◆ colorChanArithSPType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::channelArithSPType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithSPType

colorT: Channel arithmatic (Int: +*)

Definition at line 244 of file ramCanvasTpl.hpp.

◆ colorChanArithSDPType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::channelArithSDPType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithSDPType

colorT: Channel arithmatic (Int: +-*)

Definition at line 245 of file ramCanvasTpl.hpp.

◆ colorChanArithFltType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::channelArithFltType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithFltType

colorT: Channel arithmatic (Flt: +-*)

Definition at line 246 of file ramCanvasTpl.hpp.

◆ colorChanArithLogType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::channelArithLogType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorChanArithLogType

colorT: Channel arithmatic (Int: ^|&~)

Definition at line 247 of file ramCanvasTpl.hpp.

◆ colorSpaceEnum

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::colorSpaceEnum mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorSpaceEnum

colorT: Color spaces

Definition at line 248 of file ramCanvasTpl.hpp.

◆ colorCornerEnum

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::cornerColorEnum mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorCornerEnum

colorT: RGB Color Corners

Definition at line 249 of file ramCanvasTpl.hpp.

◆ colorArgType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::colorArgType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorArgType

colorT: Argument passing type

Definition at line 250 of file ramCanvasTpl.hpp.

◆ colorPtrType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::colorPtrType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorPtrType

colorT: Pointer to color

Definition at line 251 of file ramCanvasTpl.hpp.

◆ colorRefType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::colorRefType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorRefType

colorT: Ref to a color

Definition at line 252 of file ramCanvasTpl.hpp.

◆ colorCRefType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::colorCRefType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorCRefType

colorT: Const Ref to a color

Definition at line 253 of file ramCanvasTpl.hpp.

◆ csIntType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::csIntType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::csIntType

colorT: Color Scheme Integer Type

Definition at line 254 of file ramCanvasTpl.hpp.

◆ csFltType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::csFltType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::csFltType

colorT: Color Scheme Float Type

Definition at line 255 of file ramCanvasTpl.hpp.

◆ csNatType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::csNatType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::csNatType

colorT: Color Scheme Natural Type

Definition at line 256 of file ramCanvasTpl.hpp.

◆ cmfInterpolationEnum

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT::cmfInterpolationEnum mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::cmfInterpolationEnum

colorT: Interpolation for color match functions

Definition at line 257 of file ramCanvasTpl.hpp.

◆ pixelIterator

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT* mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pixelIterator

pixel store iterators

Definition at line 263 of file ramCanvasTpl.hpp.

◆ iterator

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
typedef colorT* mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::iterator

pixel store iterators

Definition at line 264 of file ramCanvasTpl.hpp.

Member Enumeration Documentation

◆ realAxisOrientation

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
enum class mjr::ramCanvasTpl::realAxisOrientation
strong

Enum for real axis orientation.

Enumerator
INVERTED 

Real axis is inverted with respect to the integer axis.

NATURAL 

Real axis is not inverted with respect to the integer axis.

Definition at line 271 of file ramCanvasTpl.hpp.

◆ intAxisOrientation

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
enum class mjr::ramCanvasTpl::intAxisOrientation
strong

Enum for integer axis orientation.

Note integer axis orientation has no impact on the in-ram representation of the image. i.e. Pixel (0,0) will always be the first element of the pixels array. The integer axis orientation is used to arrange the pixels when a canvas is saved/loaded to/from an image file.

Enumerator
INVERTED 

Zero is to the right or bottom.

NATURAL 

Zero is to the left or top.

Definition at line 279 of file ramCanvasTpl.hpp.

◆ drawModeType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
enum class mjr::ramCanvasTpl::drawModeType
strong

Enum for drawing Mode.

Enumerator
SET 

Simply set the pixel value to the new value.

XOR 

See: tfrmXor()

ADDCLAMP 

See: tfrmAddClamp()

AND 

See: tfrmAnd()

OR 

See: tfrmOr()

DIFFCLAMP 

See: tfrmDiffClamp()

MULTCLAMP 

See: tfrmMultClamp()

Definition at line 284 of file ramCanvasTpl.hpp.

◆ interpolationType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
enum class mjr::ramCanvasTpl::interpolationType
strong

Enum for drawing Mode.

Enumerator
BILINEAR 

bilinear

TRUNCATE 

Coordinates are truncated (fractional bits chopped off)

NEAREST 

Coordinates are rounded.

AVERAGE4 

Average of four sourounding pixels.

AVERAGE9 

Average of 9 sourounding pixels.

Definition at line 294 of file ramCanvasTpl.hpp.

◆ endianType

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
enum class mjr::ramCanvasTpl::endianType
strongprivate

Endianness Identifiers.

Enumerator
BIG 

PowerPC.

LITTLE 

Intel.

AUTO 

Whatever the platform uses.

Definition at line 315 of file ramCanvasTpl.hpp.

Constructor & Destructor Documentation

◆ ramCanvasTpl() [1/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl ( )

No arg constructor.

Sets numPixX and numPixY to -1, and pixels to NULL.

Definition at line 1907 of file ramCanvasTpl.hpp.

◆ ramCanvasTpl() [2/4]

◆ ramCanvasTpl() [3/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl ( intCrdT numPixX_p,
intCrdT numPixY_p,
fltCrdT minRealX_p = -1,
fltCrdT maxRealX_p = 1,
fltCrdT minRealY_p = -1,
fltCrdT maxRealY_p = 1 )

Most commonly used constructor.

The real coordinates have default values with -1 as the min values and 1 used as the max values.

Parameters
numPixX_pNumber of pixels in the X direction
numPixY_pNumber of pixels in the Y direction
minRealX_pMinimum real x coordinate value
maxRealX_pMaximum real x coordinate value
minRealY_pMinimum real y coordinate value
maxRealY_pMaximum real y coordinate value

Definition at line 1976 of file ramCanvasTpl.hpp.

◆ ramCanvasTpl() [4/4]

◆ ~ramCanvasTpl()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::~ramCanvasTpl ( )

Destructor deallocates memory for the canvas.

Definition at line 1990 of file ramCanvasTpl.hpp.

Member Function Documentation

◆ drawFillTriangleUtl()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangleUtl ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2,
intCrdT x3,
intCrdT y3,
colorT c1,
colorT c2,
colorT c3,
bool solid )
private

Utliity function behind the drawFillTriangle() functions.

Bug
Not thread safe
Parameters
x1The x coordinate of the first point
y1The y coordinate of the first point
x2The x coordinate of the second point
y2The y coordinate of the second point
x3The x coordinate of the third point
y3The y coordinate of the third point
c1The color of the first point (x1, y1)
c2The color of the second point (x2, y2)
c3The color of the third point (x3, y3)
solidUse only c1 if true, otherwise use barycentric interpolation

Definition at line 3695 of file ramCanvasTpl.hpp.

◆ writeUIntToStream()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::writeUIntToStream ( std::ostream & oStream,
endianType endianness,
int numBytes,
uint64_t data )
inlineprivate

Write an unsigned integer to a stream with given length and endianness.

Parameters
oStreamThe ostream object to which to write
endiannessThe endianness to use for the integer.
numBytesThe number of bytes of the data parameter to use (logically the least significant bits)
dataThe integer to write

Definition at line 2748 of file ramCanvasTpl.hpp.

◆ platformEndianness()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::endianType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::platformEndianness ( )
inlineprivate

Determine the platform's endianness.

Definition at line 2735 of file ramCanvasTpl.hpp.

◆ updRealCoords()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::updRealCoords ( )
inlineprivate

Several internal parameters are maintained within this class that make conversion between real coordinates and integer coordinate very fast.

This function will update the internal parameters if the real coordinate sizes or the integer coordinate sizes have changed. This function is intended for internal use. An example of when to use this function is right after the integer coordinate axes have changed via a call to newIntCoordsNC().

Definition at line 2035 of file ramCanvasTpl.hpp.

◆ newIntCoordsNC()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::newIntCoordsNC ( intCrdT numPixX_p,
intCrdT numPixY_p )
inlineprivate

Change the logical coordinate sizes.

It is important that the specified coordinate sizes describe an image with FEWER pixels than the previous sizes. This function will NOT allocate a new pixel array, so the previous array contents will be interpreted as valid data – just at different coordinates. This function causes no memory leaks. This function will NOT update the internal parameters related to real coordinate systems and so updRealCoords() should be called after this function in most cases. This function is intended for internal use and provides no safety checks.

Parameters
numPixX_pThe width of the new canvas
numPixY_pThe height of the new canvas

Definition at line 2001 of file ramCanvasTpl.hpp.

◆ reallocCanvas()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::reallocCanvas ( intCrdT numPixX_p,
intCrdT numPixY_p )
private

Destroy the current pixel memory and reallocate a new pixel space of the given size.

This will not clear the canvas. IT will not reallocate the canvas unless the new size is different from the current size. It will not allocate a new canvas if either argument is zero or less. Updates coordinates.

Parameters
numPixX_pThe width of the new canvas
numPixY_pThe height of the new canvas

Definition at line 2577 of file ramCanvasTpl.hpp.

◆ freeCanvas()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::freeCanvas ( )
private

Free the pixel memory (i)

Definition at line 2548 of file ramCanvasTpl.hpp.

◆ rePointPixels()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::rePointPixels ( colorT * new_pixels,
intCrdT new_numPixX,
intCrdT new_numPixY )
private

Points the pixels pointer at a new pixel store, and updates coordinates.

Pixels pointer not changed if new_pixels is NULL

Definition at line 2561 of file ramCanvasTpl.hpp.

◆ triangleEdger()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::triangleEdger ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2,
intCrdT * pts,
bool findMin )
inlineprivate

Used to find the left and right edges of a triangle.

Definition at line 3543 of file ramCanvasTpl.hpp.

◆ exportRasterData()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::exportRasterData ( void *& rasterData,
intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2,
int redChan,
int greenChan,
int blueChan,
int alphaChan )

Extract raster data from the image, and pack it into a typical form used by imaging applications.

Each pixel is packed into a 1, 2, 3, or 4 byte memory block with the location of each channel given by redChan, blueChan, greenChan, and alphaChan. If one of these values is -1, then that channel is not extracted. For example, all of them set to -1 except redChan (set to 0), an 8-bit gray scale image would be extracted. One might extract 24-bit RGB with redChan=0, greenChan=1, and blueChan=2. Add alphaChan=3, and extract 24-bit RGB with alpha – sometimes called 24-bit RGBA or 32-bit RGBA. Many systems expect the alpha bit to be first, so one might use alphaChan=0, redChan=1, greenChan=2, and blueChan=3 to get ARGB. As a fine example, TARGA images use BGR – blueChan=0, greenChan=1, and redChan=2. In summary:

Examples of how to pack various common raster data formats
..........RGB  RGBA  ARGB   BGR  ABGR  Grey
redChan     0     0     1     2     3     0
greenChan   1     1     2     1     2    -1
blueChan    2     2     3     0     1    -1
alphaChan  -1     3     0    -1     0    -1
Parameters
rasterDataUnsigned char pointer to image data. If NULL,then data will be allocated for image.
x1First x coordinate first corner of sub-image to extract
x2First x coordinate second corner of sub-image to extract
y1First y coordinate first corner of sub-image to extract
y2First y coordinate second corner of sub-image to extract
redChanChannel index to use for red
blueChanChannel index to use for blue
greenChanChannel index to use for green
alphaChanChannel index to use for alpha

Definition at line 3119 of file ramCanvasTpl.hpp.

◆ operator=()

◆ adjoinCanvasRight()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::adjoinCanvasRight ( const ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > & theCanvas)
inline

Adjoin the canvas to the side of the current canvas.

Warning
This function is experimental! Functionality and API are likely to change in the future.
Parameters
theCanvasThe canvas to adjoin.

Definition at line 542 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY().

Here is the call graph for this function:

◆ adjoinCanvasLeft()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::adjoinCanvasLeft ( const ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > & theCanvas)
inline

Adjoin the canvas to the side of the current canvas.

Warning
This function is experimental! Functionality and API are likely to change in the future.
Parameters
theCanvasThe canvas to adjoin.

Definition at line 553 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY().

Here is the call graph for this function:

◆ adjoinCanvasBottom()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::adjoinCanvasBottom ( const ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > & theCanvas)
inline

Adjoin the canvas to the side of the current canvas.

Warning
This function is experimental! Functionality and API are likely to change in the future.
Parameters
theCanvasThe canvas to adjoin.

Definition at line 564 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY().

Here is the call graph for this function:

◆ adjoinCanvasTop()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::adjoinCanvasTop ( const ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > & theCanvas)
inline

Adjoin the canvas to the side of the current canvas.

Warning
This function is experimental! Functionality and API are likely to change in the future.
Parameters
theCanvasThe canvas to adjoin.

Definition at line 575 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY().

Here is the call graph for this function:

◆ insertCanvas()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::insertCanvas ( const ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > & theCanvas,
intCrdT x1 = 0,
intCrdT y1 = 0 )
inline

Draw the given canvas at the indicated point.

Warning
This function is experimental! Functionality and API are likely to change in the future.
Parameters
theCanvasThe canvas to draw on the current canvas.
x1X coordinate at which to place the canvas.
y1Y coordinate at which to place the canvas.

Definition at line 588 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorRefNC().

Here is the call graph for this function:

◆ resizeCanvas()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::resizeCanvas ( intCrdT new_numPixX_p,
intCrdT new_numPixY_p )

Resize the canvas to the given size.

Contents of new canvas may be random data. Not guarnteed to reallocate the canvas.

Parameters
new_numPixX_pThe width of the new canvas
new_numPixY_pThe height of the new canvas

Definition at line 2594 of file ramCanvasTpl.hpp.

◆ expandCanvas()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::expandCanvas ( intCrdT new_numPixX_p,
intCrdT new_numPixY_p,
intCrdT x1 = 0,
intCrdT y1 = 0,
colorArgType color = colorT(colorT::minChanVal) )

Expand the current canvas.

The current image will appear within the new canvas at the specified location. All pixels not set by the previous image will be set to the given color.

Parameters
new_numPixX_pThe width of the new canvas
new_numPixY_pThe height of the new canvas
x1Coord at which the left of the old image will appear in the new image
y1Coord at which the top of the old image will appear in the new image
colorColor to use for the background of the new image.

Definition at line 2602 of file ramCanvasTpl.hpp.

◆ cropCanvas()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::cropCanvas ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2 )

This function will crop the canvas to the given rectangular region.

Parameters
x1Left, or right, edge of region to keep.
x2Right, or left, edge of region to keep.
y1Left, or right, edge of region to keep.
y2Right, or left, edge of region to keep.

Definition at line 2629 of file ramCanvasTpl.hpp.

◆ newRealCoords()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::newRealCoords ( fltCrdT minRealX_p,
fltCrdT maxRealX_p,
fltCrdT minRealY_p,
fltCrdT maxRealY_p )
inline

Change the real coordinate system associated with a canvas.

It updates all internal parameters are required.

Parameters
minRealX_pMinimum real x coordinate value
maxRealX_pMaximum real x coordinate value
minRealY_pMinimum real y coordinate value
maxRealY_pMaximum real y coordinate value

Definition at line 2017 of file ramCanvasTpl.hpp.

◆ isSameSize()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
bool mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isSameSize ( ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > const & inRC) const
inline

Return true if given canvas and current canvas are the same size.

Definition at line 640 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY().

Here is the call graph for this function:

◆ isNotSameSize()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
bool mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isNotSameSize ( ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > const & inRC) const
inline

Return true if given canvas and current canvas are NOT the same size.

Definition at line 648 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY().

Here is the call graph for this function:

◆ isClose()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
bool mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isClose ( ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > const & inRC,
colorChanType epsilon ) const
inline

Return true if corresponding pixels in each canvas are "close" as defined by colorTpl::isClose().

Definition at line 656 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorRefNC().

Here is the call graph for this function:

◆ isEqual()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
bool mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isEqual ( ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > const & inRC) const
inline

Return true if corresponding pixels in each canvas are "equal" as defined by colorTpl::isEqual().

Definition at line 667 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorRefNC().

Here is the call graph for this function:

◆ rotate90CW()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::rotate90CW ( )

Loss-less 90 degree clockwise rotation of the canvas about the center.

The top row of pixels will be on the right side after the rotation. The canvas will be resized as required. The transformation is not done "in place", so enough memory is required to duplicate the canvas.

Definition at line 2693 of file ramCanvasTpl.hpp.

◆ rotate90CCW()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::rotate90CCW ( )

Loss-less 90 degree counter clockwise rotation of the canvas about the center.

The top row of pixels will be on the left side after the rotation. The canvas will be resized as required. The transformation is not done "in place", so enough memory is required to duplicate the canvas.

Definition at line 2707 of file ramCanvasTpl.hpp.

◆ rotate180()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::rotate180 ( )

Loss-less 180 degree rotation of the canvas about the center.

The top row of pixels will be on the bottom side after the rotation. The transformation is not done "in place", so enough memory is required to duplicate the canvas.

Definition at line 2721 of file ramCanvasTpl.hpp.

◆ flipHorz()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::flipHorz ( )

Loss-less, horizontal flip of the canvas about the center.

The top row of pixels will be on the bottom side after the flip. The transformation is done "in place" so no extra RAM is required.

Definition at line 2653 of file ramCanvasTpl.hpp.

◆ flipVert()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::flipVert ( )

Loss-less, vertical flip of the canvas about the center.

The left row of pixels will be on the right side after the flip. The transformation is done "in place" so no extra RAM is required.

Definition at line 2666 of file ramCanvasTpl.hpp.

◆ flipTranspose()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::flipTranspose ( )

Loss-less, vertical flip of the canvas about the center.

The top row of pixels will be on the left side after the flip, and pixel (x,y) will be in position (y,x). The canvas will be resized as required. The transformation is not done "in place", so enough memory is required to duplicate the canvas.

Definition at line 2679 of file ramCanvasTpl.hpp.

◆ scaleUpProximal()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::scaleUpProximal ( int xfactor)

Scale up the image using proximal interpolation.

For each source pixel we create an xfactor*xfactor box filled with the color of the original pixel. The resulting images are block, but the histograms stay accurate. The algorithm is very fast as it is very simple.

Parameters
xfactorThe factor to scale up to – must be a positive integer.

Definition at line 4109 of file ramCanvasTpl.hpp.

◆ scaleDown1pt()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::scaleDown1pt ( int xfactor)

Scale down using only the upper left pixel from each block.

This will tend to highlight horizontal and vertical detail and generally sharpen up the image. Much data is lost with this sort of scaling operation.

Parameters
xfactorThe factor to scale up to – must be a positive integer.

Definition at line 4135 of file ramCanvasTpl.hpp.

◆ scaleDownMax()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::scaleDownMax ( int xfactor)

Scale down using only the pixel with maximum luminosity in each block.

Much like scaleDown1pt(), this will sharpen up a scaled image, but it will also tend to brighten up the image as well.

Parameters
xfactorThe factor to scale up to – must be a positive integer.

Definition at line 4174 of file ramCanvasTpl.hpp.

◆ scaleDownMean()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::scaleDownMean ( int xfactor)

Scale down using the mean pixel value from each block.

This creates each pixel value by averaging all of the pixels that contribute – i.e. a mean on the xfactor*xfactor pixel corresponding to each new pixel. This algorithm tends to "fuzz-up" the result – frequently used for super-sampling.

Parameters
xfactorThe factor to scale down to – must be a positive integer.

Definition at line 4150 of file ramCanvasTpl.hpp.

◆ geomTfrmRevRPoly()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevRPoly ( std::vector< double > const & RPoly,
double rScale,
double Xo,
double Yo,
double oScale,
colorArgType errorColor = colorCornerEnum::GREEN,
interpolationType interpMethod = interpolationType::BILINEAR )

Geometric Transform via Radial Polynomial implemented with Reverse Mapping.

Warning
This function is experimental! Functionality and API are likely to change in the future.
Parameters
RPolyRPoly is a vector listing the coefficients of a univariate polynomial in lexicographical order – i.e. RPoly[0] is the coefficients on the highest power term.
rScaleScale to apply before the transformation to the radius.
XoX coordinate for origin translation – applied before RPoly and reversed after RPoly & scale.
YoY coordinate for origin translation – applied before RPoly and reversed after RPoly & scale.
oScaleScale to apply after RPoly and before reverse translation.
errorColorThe color to use for pixels with no valid mapping.
interpMethodEventually this will be the interpolation method used.

Definition at line 4707 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPointNC().

Here is the call graph for this function:

◆ geomTfrmRevBiPoly()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevBiPoly ( std::vector< double > const & BiPolyX,
std::vector< double > const & BiPolyY,
double Xo,
double Yo,
double oScale,
colorArgType errorColor = colorCornerEnum::GREEN,
interpolationType interpMethod = interpolationType::BILINEAR )

Geometric Transform via bivariate polynomial implemented with Reverse Mapping.

Warning
This function is experimental! Functionality and API are likely to change in the future.
Parameters
BiPolyXCoefficients for a bivariate polynomial in lexicographical order – used to map x coordinates.
BiPolyYCoefficients for a bivariate polynomial in lexicographical order – used to map y coordinates.
XoX coordinate for origin translation – applied before BiPoly*and reversed after BiPoly*& scale.
YoY coordinate for origin translation – applied before BiPoly*and reversed after BiPoly*& scale.
oScaleScale to apply after BiPoly*and before reverse translation.
errorColorThe color to use for pixels with no valid mapping.
interpMethodEventually this will be the interpolation method used.

Definition at line 4740 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPointNC().

Here is the call graph for this function:

◆ geomTfrmRevAff()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevAff ( std::vector< double > const & HAMatrix,
double Xo,
double Yo,
double oScale,
colorArgType errorColor = colorCornerEnum::GREEN,
interpolationType interpMethod = interpolationType::BILINEAR )

Homogenious Affine Geometric Transform implemented with Reverse Mapping.

Warning
This function is experimental! Functionality and API are likely to change in the future.
 [1 0 T_x]   [S_x 0   0]   [cA  sA 0]             [x_in]    [x_out]
 [0 1 T_y]   [0   S_y 0]   [-SA cA 0]         T * [y_in] => [y_out]
 [0 0 1  ]   [0   0   1]   [0   0  1]             [1   ]    [1    ]
Parameters
HAMatrixHomogeneous affine transform matrix – 9 elements interpreted as a row major order 3x3 matrix.
XoX coordinate for origin translation – applied before HAMatrixand reversed after HAMatrix& scale.
YoY coordinate for origin translation – applied before HAMatrixand reversed after HAMatrix& scale.
oScaleScale to apply after HAMatrixand before reverse translation.
errorColorThe color to use for pixels with no valid mapping.
interpMethodEventually this will be the interpolation method used.

Definition at line 4680 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPointNC().

Here is the call graph for this function:

◆ geomTfrmRevArb()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevArb ( mjr::point2d< double >(* )(double, double),
double Xo,
double Yo,
double oScale,
colorArgType errorColor = colorCornerEnum::GREEN,
interpolationType interpMethod = interpolationType::BILINEAR )

Geometric Transform via provided mapping function implemented with Reverse Mapping.

Warning
This function is experimental! Functionality and API are likely to change in the future.
Parameters
fThe coordinate transformation function
XoX coordinate for origin translation – applied before f and reversed after f & scale.
YoY coordinate for origin translation – applied before f and reversed after f & scale.
oScaleScale to apply after f and before reverse translation.
errorColorThe color to use for pixels with no valid mapping.
interpMethodEventually this will be the interpolation method used.

Definition at line 4652 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPointNC(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Here is the call graph for this function:

◆ convolution() [1/3]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::convolution ( double * kernel,
int kWide,
int kTall,
double divisor )

Apply a convolution filter.

The implementation for this method is quite naive and super slow! Frankly, this kind of functionality is beyond the scope of this library; however, sometimes you just need a convolution filter and you don't want to go to the extra effort of using yet another external library. Pixels outside the canvas are considered black.

Parameters
kernelThe convolution kernel. Must be of length kWide*kTall.
kWideThe width of the kernel. Must be odd.
kTallThe height of the kernel. Must be odd.
divisorUsed to normalize dot product at each step. i.e. one might say the kernel for the convolution is really kernel/divisor.

Definition at line 4220 of file ramCanvasTpl.hpp.

◆ convolution() [2/3]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::convolution ( double * kernel,
int kSize,
double divisor )
inline

Definition at line 4256 of file ramCanvasTpl.hpp.

◆ convolution() [3/3]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::convolution ( double * kernel,
int kSize )
inline

Definition at line 4263 of file ramCanvasTpl.hpp.

◆ computeConvolutionMatrixGausian()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::computeConvolutionMatrixGausian ( double * kernel,
int kSize,
double sd )

Compute a Gaussian convolution kernel (use with divisor==1.0).

Parameters
kernelPointer to space for the convolution kernel. Must have at least space for kSize*kSize doubles
kSizeThe width and height of the kernel. Must be odd.
sdThe standard deviation.

Definition at line 4195 of file ramCanvasTpl.hpp.

◆ computeConvolutionMatrixBox()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::computeConvolutionMatrixBox ( double * kernel,
int kSize )

Compute a box blur convolution kernel (use with divisor==1.0).

Parameters
kernelPointer to space for the convolution kernel. Must have at least space for kSize*kSize doubles
kSizeThe width and height of the kernel. Must be odd.

Definition at line 4210 of file ramCanvasTpl.hpp.

◆ begin()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
colorT * mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::begin ( )
inline

Definition at line 861 of file ramCanvasTpl.hpp.

◆ end()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
colorT * mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::end ( )
inline

Definition at line 862 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [1/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )())
inline

Apply a homogeneous pixel transformation.

Homogeneous pixel transformations don't vary based upon the coordinates of the pixel in question, but depend only upon the value of the pixel. Thus, a homogeneous pixel transformation can be considered as a pixel function applied to each pixel in an image. Many standard pixel functions are defined within the colorT object. The ramCanvasTpl object must then only apply the methods available within each colorT class to support most of the standard homogeneous pixel transformations. Additionally, new functions are automatically available to the ramCanvasTpl (both in the colorT class and new functions from other sources).

Definition at line 2174 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [2/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(double),
double arg1 )
inline

Definition at line 2264 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [3/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(double, double),
double arg1,
double arg2 )
inline

Definition at line 2274 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [4/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(double, double, double),
double arg1,
double arg2,
double arg3 )
inline

Definition at line 2284 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [5/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(double, double, double, double),
double arg1,
double arg2,
double arg3,
double arg4 )
inline

Definition at line 2294 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [6/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(double, double, double, double, double),
double arg1,
double arg2,
double arg3,
double arg4,
double arg5 )
inline

Definition at line 2305 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [7/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(double, double, double, double, double, double),
double arg1,
double arg2,
double arg3,
double arg4,
double arg5,
double arg6 )
inline

Definition at line 2315 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [8/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(int),
int arg1 )
inline

Definition at line 2224 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [9/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(int, int),
int arg1,
int arg2 )
inline

Definition at line 2234 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [10/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(int, int, int),
int arg1,
int arg2,
int arg3 )
inline

Definition at line 2244 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [11/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(int, int, int, int),
int arg1,
int arg2,
int arg3,
int arg4 )
inline

Definition at line 2254 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [12/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(colorT),
colorT arg1 )
inline

Definition at line 2184 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [13/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(colorT, colorT),
colorT arg1,
colorT arg2 )
inline

Definition at line 2194 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [14/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(colorT, colorT, colorT),
colorT arg1,
colorT arg2,
colorT arg3 )
inline

Definition at line 2204 of file ramCanvasTpl.hpp.

◆ applyHomoPixTfrm() [15/15]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::applyHomoPixTfrm ( colorT &(colorT::* HPT )(colorT, colorT, colorT, colorT),
colorT arg1,
colorT arg2,
colorT arg3,
colorT arg4 )
inline

Definition at line 2214 of file ramCanvasTpl.hpp.

◆ autoHistStrech()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::autoHistStrech ( )

Computes a linear grey level scale homogeneous pixel transformation.

f(c)=(c-cmin)*maxChanVal/(cmax-cmin) where cmin is the lowest integer value assumed by any pixel color component and cmax is the largest integer value assumed by any pixel color component. This function is sometimes called "auto contrast adjust" or "linear auto contrast adjust".

Definition at line 2122 of file ramCanvasTpl.hpp.

◆ autoMaxHistStrechRGB()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::autoMaxHistStrechRGB ( )

Computes a, possibly different, linear grey level scale homogeneous pixel transformation on each channel of the image.

Channel n is transformed such that f_n(c)=(c-cmin_n)*maxChanVal/(cmax_n-cmin_n) where cmin_n and cmax_n are the minimum and maximum values in channel n. i.e. this is the same as applying autoHistStrech independently to each channel.

Definition at line 2147 of file ramCanvasTpl.hpp.

◆ combineRamCanvasBinOp()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::combineRamCanvasBinOp ( colorT &(colorT::* HPT )(colorT),
const ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > & theCanvas,
intCrdT trgX = 0,
intCrdT trgY = 0,
intCrdT wide = -1,
intCrdT tall = -1,
intCrdT srcX = 0,
intCrdT srcY = 0 )
inline

This function takes a ramCanvasTpl and combines it with the current ramCanvasTpl using the provided binary operator.

Parameters
HPTPointer to a binary operator.
theCanvasThis is the ramCanvasTpl to combine with.
trgXFinal X coordinate for the left of the combined region. Default: 0
trgYFinal Y coordinate for the top of the combined region. Default: 0
srcXLeft edge of the region to combine with. Default: 0
srcYTop edge of the region to combine with. Default: 0
wideWidth of the region to combine with. Default: -1 (indicates to edge of canvas)
tallHeight of the region to combine with. Default: -1 (indicates to edge of canvas)

Definition at line 2325 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixY(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor().

Here is the call graph for this function:

◆ combineRamCanvasMean()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::combineRamCanvasMean ( ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes > * theCanvasList,
const int N )

Take a list of ramCanvasTpl objects and combine them with the current ramCanvasTpl using mean.

Parameters
theCanvasListThis is the array of ramCanvasTpl's to combine with.
NThe number of canvas objects.

◆ clrCanvasToBlack()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::clrCanvasToBlack ( )
inline

Clear the canvas to black.

Faster than clrCanvas().

Definition at line 2066 of file ramCanvasTpl.hpp.

◆ clrCanvasToWhite()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::clrCanvasToWhite ( )
inline

Clear the canvas to black.

Faster than clrCanvas().

Definition at line 2094 of file ramCanvasTpl.hpp.

◆ clrCanvasChannelToMin()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::clrCanvasChannelToMin ( int chan)
inline

Set the given channel to the minimum value.

Definition at line 2046 of file ramCanvasTpl.hpp.

◆ clrCanvasChannelToMax()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::clrCanvasChannelToMax ( int chan)
inline

Set the given channel to the maximum value.

Definition at line 2056 of file ramCanvasTpl.hpp.

◆ clrCanvas() [1/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::clrCanvas ( )
inline

Clear the canvas.


Definition at line 2104 of file ramCanvasTpl.hpp.

◆ clrCanvas() [2/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::clrCanvas ( colorArgType color)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 2112 of file ramCanvasTpl.hpp.

◆ moveTo() [1/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo ( intCrdT x,
intCrdT y )
inline

Set the current default point to the given coordinates.

Parameters
xThe x coordinate of the point to move to.
yThe y coordinate of the point to move to.

Definition at line 967 of file ramCanvasTpl.hpp.

◆ moveTo() [2/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo ( fltCrdT x,
fltCrdT y )
inline

Definition at line 968 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveTo() [3/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo ( pointIntType thePoint)
inline

Definition at line 969 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ moveTo() [4/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo ( pointFltType thePoint)
inline

Definition at line 970 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::moveTo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDfltColor() [1/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::setDfltColor ( colorArgType color)
inline

Set the default color.

Definition at line 978 of file ramCanvasTpl.hpp.

◆ setDfltColor() [2/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::setDfltColor ( std::string cornerColor)
inline

Definition at line 979 of file ramCanvasTpl.hpp.

◆ setDfltColor() [3/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::setDfltColor ( const char * cornerColor)
inline

Definition at line 980 of file ramCanvasTpl.hpp.

◆ setDfltColor() [4/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::setDfltColor ( colorChanType r,
colorChanType g,
colorChanType b )
inline

Definition at line 981 of file ramCanvasTpl.hpp.

◆ drawPoint() [1/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint ( intCrdT x,
intCrdT y,
colorArgType color )
inline

Draw a point at the specified coordinates with the specified color.

Overloaded versions exist with various arguments.

Parameters
xThe x coordinate of the point
yThe y coordinate of the point
colorThe color to draw the point

Definition at line 993 of file ramCanvasTpl.hpp.

Referenced by main().

Here is the caller graph for this function:

◆ drawPoint() [2/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint ( )
inline

Definition at line 997 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawPoint() [3/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint ( colorArgType color)
inline

Definition at line 998 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawPoint() [4/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint ( intCrdT x,
intCrdT y )
inline

Definition at line 999 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawPoint() [5/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint ( fltCrdT x,
fltCrdT y )
inline

Definition at line 1000 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawPoint() [6/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint ( fltCrdT x,
fltCrdT y,
colorArgType color )
inline

Definition at line 1001 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawPoint() [7/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint ( pointIntType thePoint,
colorArgType color )
inline

Definition at line 1002 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawPoint() [8/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint ( pointIntType thePoint)
inline

Definition at line 1003 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawPoint() [9/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint ( pointFltType thePoint)
inline

Definition at line 1004 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawPoint() [10/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint ( pointFltType thePoint,
colorArgType color )
inline

Definition at line 1005 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPoint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [1/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2,
colorArgType color )

Draw a line.

This function is optimized for speed, and has special code for handling lines of slope 0, 1, -1, and infinity. Line is clipped to the current canvas.

Parameters
x1x coordinate of the first point
y1y coordinate of the first point
x2x coordinate of the second point
y2y coordinate of the second point
colorThe color to use
Performance Note
This function will perform better if (x1,y2) and (x2,y2) are in the clip region. Further x1<x2 will save several steps in the algorithm.
Algorithm Notes
This function treats lines of slope 0, 1, -1, and infinity as special cases. Special clipping and drawing algorithms are used for each case. All other lines are broken up into four classes by slope: 0<m<1, 1<m<infinity, -1<m<0, and -infinity<m<-1. Separate line clipping algorithms are used for positive slope lines and for negative slope lines.

The algorithms used to draw lines in the last four cases are related to the classic algorithm presented by Bresenham in 1965 and the extensions to Bresenham's algorithm given by Pitteway in 1967 and Van Aken in 1984. The basic algorithm described by Bresenham, Pitteway, and Van Aken is known as the "Midpoint Algorithm". For the case 0<m<1, the algorithm used is actually the midpoint algorithm, and the remaining cases are obvious extensions to the midpoint algorithm. Each case is customized and optimized for the given slope class.

The clipping algorithm used for the last slope classes is similar in spirit to the Cohen-Sutherland Line-Clipping algorithm, but is optimized for each slope class. Several pre-checks are made in order to avoid the slope computations in the Cohen-Sutherland algorithm – in fact intersections are only computed if absolutely required. Note that the only floating point computations in this function are the intersection computations, and they will be avoided completely if the given line need not be clipped.

Definition at line 2365 of file ramCanvasTpl.hpp.

◆ drawLine() [2/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( pointFltType point1)
inline

Definition at line 1040 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [3/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( pointFltType point1,
colorArgType color )
inline

Definition at line 1041 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [4/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( pointIntType point1)
inline

Definition at line 1042 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [5/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( pointIntType point1,
colorArgType color )
inline

Definition at line 1043 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [6/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( pointFltType point1,
pointFltType point2 )
inline

Definition at line 1044 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [7/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( pointFltType point1,
pointFltType point2,
colorArgType color )
inline

Definition at line 1045 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [8/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( pointIntType point1,
pointIntType point2 )
inline

Definition at line 1046 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [9/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( pointIntType point1,
pointIntType point2,
colorArgType color )
inline

Definition at line 1047 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [10/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( intCrdT x,
intCrdT y )
inline

Definition at line 1048 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [11/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( fltCrdT x,
fltCrdT y )
inline

Definition at line 1049 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [12/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( intCrdT x,
intCrdT y,
colorArgType color )
inline

Definition at line 1050 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [13/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( fltCrdT x,
fltCrdT y,
colorArgType color )
inline

Definition at line 1051 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [14/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2 )
inline

Definition at line 1052 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [15/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( fltCrdT x1,
fltCrdT y1,
fltCrdT x2,
fltCrdT y2 )
inline

Definition at line 1053 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawLine() [16/16]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine ( fltCrdT x1,
fltCrdT y1,
fltCrdT x2,
fltCrdT y2,
colorArgType color )
inline

Definition at line 1054 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawLine().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTriangle() [1/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2,
intCrdT x3,
intCrdT y3,
colorArgType color )
inline

Draw an un-filled triangle.

Bug
Some pixels may be drawn more than once.
Parameters
x1The x coordinate of the first point
y1The y coordinate of the first point
x2The x coordinate of the second point
y2The y coordinate of the second point
x3The x coordinate of the third point
y3The y coordinate of the third point
colorThe color to use for the triangle

Definition at line 3927 of file ramCanvasTpl.hpp.

◆ drawTriangle() [2/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle ( pointIntType * thePoints,
colorArgType color )
inline

Definition at line 1071 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTriangle() [3/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle ( pointFltType * thePoints)
inline

Definition at line 1072 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTriangle() [4/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle ( pointFltType * thePoints,
colorArgType color )
inline

Definition at line 1075 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTriangle() [5/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle ( pointIntType * thePoints)
inline

Definition at line 1078 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTriangle() [6/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle ( pointIntType point1,
pointIntType point2,
pointIntType point3 )
inline

Definition at line 1079 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTriangle() [7/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle ( pointFltType point1,
pointFltType point2,
pointFltType point3 )
inline

Definition at line 1080 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTriangle() [8/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle ( pointFltType point1,
pointFltType point2,
pointFltType point3,
colorArgType color )
inline

Definition at line 1083 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTriangle() [9/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle ( pointIntType point1,
pointIntType point2,
pointIntType point3,
colorArgType color )
inline

Definition at line 1086 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTriangle() [10/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle ( fltCrdT x1,
fltCrdT y1,
fltCrdT x2,
fltCrdT y2,
fltCrdT x3,
fltCrdT y3 )
inline

Definition at line 1087 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTriangle() [11/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle ( fltCrdT x1,
fltCrdT y1,
fltCrdT x2,
fltCrdT y2,
fltCrdT x3,
fltCrdT y3,
colorArgType color )
inline

Definition at line 1088 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawTriangle() [12/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2,
intCrdT x3,
intCrdT y3 )
inline

Definition at line 1089 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillTriangle() [1/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2,
intCrdT x3,
intCrdT y3,
colorArgType color )
inline

Draw a triangle filled with a solid color using a nicely optimized, horizontal scan conversion algorithm.

Bug

Triangles not entirely on the canvas are not rendered.

Not thread safe.

Parameters
x1The x coordinate of the first point
y1The y coordinate of the first point
x2The x coordinate of the second point
y2The y coordinate of the second point
x3The x coordinate of the third point
y3The y coordinate of the third point
colorThe color to use for the triangle

Definition at line 3676 of file ramCanvasTpl.hpp.

◆ drawFillTriangle() [2/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( pointIntType * thePoints,
colorArgType color )
inline

Definition at line 1107 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillTriangle() [3/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( pointFltType * thePoints)
inline

Definition at line 1108 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillTriangle() [4/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( pointFltType * thePoints,
colorArgType color )
inline

Definition at line 1111 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillTriangle() [5/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( pointIntType * thePoints)
inline

Definition at line 1114 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillTriangle() [6/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( pointIntType point1,
pointIntType point2,
pointIntType point3 )
inline

◆ drawFillTriangle() [7/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( pointFltType point1,
pointFltType point2,
pointFltType point3 )
inline

◆ drawFillTriangle() [8/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( pointFltType point1,
pointFltType point2,
pointFltType point3,
colorArgType color )
inline

◆ drawFillTriangle() [9/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( pointIntType point1,
pointIntType point2,
pointIntType point3,
colorArgType color )
inline

◆ drawFillTriangle() [10/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( fltCrdT x1,
fltCrdT y1,
fltCrdT x2,
fltCrdT y2,
fltCrdT x3,
fltCrdT y3 )
inline

Definition at line 1125 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillTriangle() [11/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( fltCrdT x1,
fltCrdT y1,
fltCrdT x2,
fltCrdT y2,
fltCrdT x3,
fltCrdT y3,
colorArgType color )
inline

Definition at line 1126 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillTriangle() [12/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2,
intCrdT x3,
intCrdT y3 )
inline

Definition at line 1127 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillTriangle() [13/13]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillTriangle ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2,
intCrdT x3,
intCrdT y3,
colorArgType color1,
colorArgType color2,
colorArgType color3 )
inline

Draw a filled triangle using barycentric color interpolation.

Bug

Triangles not entirely on the canvas are not rendered.

Degenerate trainagles are not rendered

Painfully slow

Parameters
x1The x coordinate of the first point
y1The y coordinate of the first point
x2The x coordinate of the second point
y2The y coordinate of the second point
x3The x coordinate of the third point
y3The y coordinate of the third point
color1The color of the first point (x1, y1)
color2The color of the second point (x2, y2)
color3The color of the third point (x3, y3)

Definition at line 3684 of file ramCanvasTpl.hpp.

◆ drawRectangle() [1/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2,
colorArgType color )

Draw an unfilled rectangle with diagonal corners located at (x1, y1) and and (x2, y2).

Best performance will be achieved if (x1, y1) is the upper left corner, and (x2,y2) is the lower left corner and both (x1,y1) and (x2,y2) are within the bounds of the canvas using the specified color.

Parameters
x1The x coordinate of first corner
y1The y coordinate of first corner
x2The x coordinate of second corner
y2The y coordinate of second corner
colorThe color to use

Definition at line 4034 of file ramCanvasTpl.hpp.

◆ drawRectangle() [2/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle ( pointIntType point1,
pointIntType point2,
colorArgType color )
inline

Definition at line 1163 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawRectangle() [3/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle ( pointIntType point1,
pointIntType point2 )
inline

Definition at line 1164 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawRectangle() [4/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle ( pointFltType point1,
pointFltType point2,
colorArgType color )
inline

Definition at line 1165 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawRectangle() [5/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle ( pointFltType point1,
pointFltType point2 )
inline

Definition at line 1166 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawRectangle() [6/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle ( pointIntType * thePoints,
colorArgType color )
inline

Definition at line 1167 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawRectangle() [7/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle ( pointFltType * thePoints)
inline

Definition at line 1168 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawRectangle() [8/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle ( pointFltType * thePoints,
colorArgType color )
inline

Definition at line 1169 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawRectangle() [9/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle ( pointIntType * thePoints)
inline

Definition at line 1170 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawRectangle() [10/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle ( fltCrdT x1,
fltCrdT y1,
fltCrdT x2,
fltCrdT y2 )
inline

Definition at line 1171 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawRectangle() [11/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle ( fltCrdT x1,
fltCrdT y1,
fltCrdT x2,
fltCrdT y2,
colorArgType color )
inline

Definition at line 1172 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawRectangle() [12/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2 )
inline

Definition at line 1173 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillRectangle() [1/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2,
colorArgType color )
inline

Draw a filled rectangle with diagonal corners located at (x1, y1) and and (x2, y2).

Best performance will be achieved if (x1, y1) is the upper left corner, and (x2,y2) is the lower left corner and both (x1,y1) and (x2,y2) are within the bounds of the canvas using the specified color.

Parameters
x1The x coordinate of first corner
y1The y coordinate of first corner
x2The x coordinate of second corner
y2The y coordinate of second corner
colorThe color to use

Definition at line 4065 of file ramCanvasTpl.hpp.

◆ drawFillRectangle() [2/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle ( pointIntType point1,
pointIntType point2,
colorArgType color )
inline

◆ drawFillRectangle() [3/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle ( pointIntType point1,
pointIntType point2 )
inline

◆ drawFillRectangle() [4/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle ( pointFltType point1,
pointFltType point2,
colorArgType color )
inline

◆ drawFillRectangle() [5/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle ( pointFltType point1,
pointFltType point2 )
inline

◆ drawFillRectangle() [6/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle ( pointIntType * thePoints,
colorArgType color )
inline

Definition at line 1193 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillRectangle() [7/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle ( pointFltType * thePoints)
inline

Definition at line 1194 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillRectangle() [8/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle ( pointFltType * thePoints,
colorArgType color )
inline

Definition at line 1195 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillRectangle() [9/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle ( pointIntType * thePoints)
inline

Definition at line 1196 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillRectangle() [10/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle ( fltCrdT x1,
fltCrdT y1,
fltCrdT x2,
fltCrdT y2 )
inline

Definition at line 1197 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillRectangle() [11/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle ( fltCrdT x1,
fltCrdT y1,
fltCrdT x2,
fltCrdT y2,
colorArgType color )
inline

Definition at line 1198 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillRectangle() [12/12]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2 )
inline

Definition at line 1199 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillRectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawCircle() [1/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle ( intCrdT centerX,
intCrdT centerY,
intCrdT radiusX,
colorArgType color )

Draw an un-filled circle.

The algorithm used is based upon the one presented in "A Linear Algorithm for Incremental Digital Display of Circular Arcs" published in the Communications of the AMC in Feb 1977 and written by J.E. Bresenham. Bresenham's algorithm has been significantly improved by using only integer arithmetic and adding second order differences to the computation – much the way the line drawing algorithm works in this package. The algorithm is essentially a scan line conversion algorithm, so the circle is always approximately one pixel thick. One subtle point: The real X and Y axes in this package can have different scaling. This means that one must pick a direction in which the radius will be measured in real coordinate deltas. In this function, that direction is along the X axis – i.e. the radius of the drawn circle will be measured horizontally. This function is well optimized.

Bug
Draws everyting even if it's off the canvas.
Parameters
centerXThe x coordinate of the center
centerYThe y coordinate of the center
radiusXThe radius of the circle
colorThe color to draw the circle with

Definition at line 3937 of file ramCanvasTpl.hpp.

◆ drawCircle() [2/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle ( intCrdT radiusX)
inline

Definition at line 1220 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawCircle() [3/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle ( fltCrdT radiusX)
inline

Definition at line 1221 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawCircle() [4/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle ( pointFltType centerPoint,
fltCrdT radiusX )
inline

Definition at line 1222 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawCircle() [5/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle ( pointFltType centerPoint,
fltCrdT radiusX,
colorArgType color )
inline

Definition at line 1223 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawCircle() [6/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle ( pointIntType centerPoint,
intCrdT radiusX )
inline

Definition at line 1224 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawCircle() [7/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle ( pointIntType centerPoint,
intCrdT radiusX,
colorArgType color )
inline

Definition at line 1225 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawCircle() [8/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle ( fltCrdT centerX,
fltCrdT centerY,
fltCrdT radiusX )
inline

Definition at line 1226 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawCircle() [9/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle ( fltCrdT centerX,
fltCrdT centerY,
fltCrdT radiusX,
colorArgType color )
inline

Definition at line 1227 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawCircle() [10/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle ( intCrdT centerX,
intCrdT centerY,
intCrdT radiusX )
inline

Definition at line 1228 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillCircle() [1/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle ( intCrdT centerX,
intCrdT centerY,
intCrdT radiusX,
colorArgType color )

Draw an un-filled circle.

The algorithm used to compute circle edge points is the same as that used in drawCircle; however, the algorithm used to fill the circle is of my own design. I doubt that it is new, but I have never come across it in my readings – not that I have looked too hard. The algorithm has the advantage that most of the interior points are only drawn one time. One subtle point: The real X and Y axes in this package can have different scaling. This means that one must pick a direction in which the radius will be measured in real coordinate deltas. In this function, that direction is along the X axis – i.e. the radius of the drawn circle will be measured horizontally. This function is well optimized.

Bug
Draws everyting even if it's off the canvas.
Parameters
centerXThe x coordinate of the center
centerYThe y coordinate of the center
radiusXThe radius of the circle
colorThe color to draw the circle with

Definition at line 3981 of file ramCanvasTpl.hpp.

◆ drawFillCircle() [2/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle ( fltCrdT radiusX)
inline

Definition at line 1247 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillCircle() [3/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle ( intCrdT radiusX)
inline

Definition at line 1248 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillCircle() [4/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle ( pointFltType centerPoint,
fltCrdT radiusX,
colorArgType color )
inline

Definition at line 1249 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillCircle() [5/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle ( pointFltType centerPoint,
fltCrdT radiusX )
inline

Definition at line 1250 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillCircle() [6/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle ( pointIntType centerPoint,
intCrdT radiusX,
colorArgType color )
inline

Definition at line 1251 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillCircle() [7/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle ( pointIntType centerPoint,
intCrdT radiusX )
inline

Definition at line 1252 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillCircle() [8/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle ( fltCrdT centerX,
fltCrdT centerY,
fltCrdT radiusX )
inline

Definition at line 1253 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillCircle() [9/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle ( fltCrdT centerX,
fltCrdT centerY,
fltCrdT radiusX,
colorArgType color )
inline

Definition at line 1254 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawFillCircle() [10/10]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle ( intCrdT centerX,
intCrdT centerY,
intCrdT radiusX )
inline

Definition at line 1255 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawFillCircle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawPLCurve() [1/8]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPLCurve ( int numPoints,
intCrdT * x,
intCrdT * y,
colorArgType color )
inline

Draw Piece-Wise Linear Curves.

Bug
Some pixels may be drawn more than once.

Definition at line 3884 of file ramCanvasTpl.hpp.

◆ drawPLCurve() [2/8]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPLCurve ( int numPoints,
intCrdT * x,
intCrdT * y )
inline

Definition at line 3876 of file ramCanvasTpl.hpp.

◆ drawPLCurve() [3/8]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPLCurve ( int numPoints,
fltCrdT * x,
fltCrdT * y,
colorArgType color )
inline

Definition at line 3867 of file ramCanvasTpl.hpp.

◆ drawPLCurve() [4/8]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPLCurve ( int numPoints,
fltCrdT * x,
fltCrdT * y )
inline

Definition at line 3859 of file ramCanvasTpl.hpp.

◆ drawPLCurve() [5/8]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPLCurve ( int numPoints,
pointIntType * thePoints,
colorArgType color )
inline

Definition at line 3893 of file ramCanvasTpl.hpp.

◆ drawPLCurve() [6/8]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPLCurve ( int numPoints,
pointIntType * thePoints )
inline

Definition at line 3911 of file ramCanvasTpl.hpp.

◆ drawPLCurve() [7/8]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPLCurve ( int numPoints,
pointFltType * thePoints,
colorArgType color )
inline

Definition at line 3902 of file ramCanvasTpl.hpp.

◆ drawPLCurve() [8/8]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPLCurve ( int numPoints,
pointFltType * thePoints )
inline

Definition at line 3919 of file ramCanvasTpl.hpp.

◆ drawHersheyGlyph() [1/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawHersheyGlyph ( int glyphNum,
intCrdT x,
intCrdT y,
double magX,
double magY,
colorArgType aColor )

Render a glyph from the Hershey character set.

The glyph is rendered with its origin at the given coordinates. This function is intended to provide only the most basic glyph rendering. For example, glyphs are rendered with the line drawing functions, and therefore are not anti-aliased.

Parameters
glyphNumThe character number of the glyph to render
xThe x coordinate at which to render the glyph
yThe x coordinate at which to render the glyph
magXThe magnification of the glyph in the x direction
magYThe magnification of the glyph in the y direction
aColorThe color with which to render the glyph

Definition at line 4271 of file ramCanvasTpl.hpp.

References mjr::hershey::chars.

◆ drawHersheyGlyph() [2/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawHersheyGlyph ( int glyphNum,
fltCrdT x,
fltCrdT y,
double magX,
double magY,
colorArgType aColor )
inline

Definition at line 1289 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawHersheyGlyph().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawHersheyGlyph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawString() [1/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawString ( std::string aString,
mjr::hershey::font aFont,
intCrdT x,
intCrdT y,
colorArgType aColor,
double cex,
intCrdT spc )
inline

Render a string using Hershey ASCII Fonts.

While the string is rendered with fixed font spacing, the Hershey fonts are not fixed width fonts.

Parameters
aStringThe string
aFontThe font to set the default with
xThe x coordinate at which to render the first glyph
yThe x coordinate at which to render the first glyph
aColorThe color with which to render the glyphs
cexA factor by which to expand the size of each glyph – 1 is a good value (the name comes from R).
spcSpace to jump for each charcter – 20 for SL fonts, 23 for DL fonts, and 25 for TL fonts. Scaled with cex.

Definition at line 4307 of file ramCanvasTpl.hpp.

References mjr::hershey::ascii2hershey.

◆ drawString() [2/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawString ( std::string aString,
mjr::hershey::font aFont,
fltCrdT x,
fltCrdT y,
colorArgType aColor,
double cex,
intCrdT spc )
inline

Definition at line 1307 of file ramCanvasTpl.hpp.

◆ drawStringBox() [1/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawStringBox ( std::string aString,
mjr::hershey::font aFont,
intCrdT x,
intCrdT y,
colorArgType stringColor,
colorArgType boxColor,
double cex,
intCrdT spc )
inline

Renders a filled, bounding box for the given string as rendered via drawString.

Parameters
aStringA string to render
aFontThe font to set the default with
xThe x coordinate at which to render the first glyph
yThe x coordinate at which to render the first glyph
stringColorThe color with which to render the glyphs
boxColorThe color with which to render the BOX
cexA factor by which to expand the size of each glyph – 1 is a good value (the name comes from R).
spcSpace to jump for each charcter – 20 for SL fonts, 23 for DL fonts, and 25 for TL fonts. Scaled with cex.

Definition at line 4321 of file ramCanvasTpl.hpp.

◆ drawStringBox() [2/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawStringBox ( std::string aString,
mjr::hershey::font aFont,
fltCrdT x,
fltCrdT y,
colorArgType stringColor,
colorArgType boxColor,
double cex,
intCrdT spc )
inline

Definition at line 1321 of file ramCanvasTpl.hpp.

◆ supportLibTIFF()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
bool mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::supportLibTIFF ( )
inline

Is libTIFF supported – that is: will the readTIFFfile() method do anything? Note that readTIFFfile() is the only method that needs libTIFF.

In particular, writeTIFFfile() works without libTIFF.

Definition at line 4640 of file ramCanvasTpl.hpp.

◆ readTIFFfile()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::readTIFFfile ( std::string fileName)

If the libTIFF library was found at build time, this function will read a TIFF file into current ramCanvas object.

If libTIFF is not supported, then this function returns 32. You can test if this method works via the supportLibTIFF() method.

Notable features:

  • Arbitrary TIFF image file types are converted to 24-bit RGB when aRamCanvas is of type ramCanvas3c8b
    • Note aRamCanvas must be of type ramCanvas3c8b – ramCanvas4c8b is not good enough.
  • Reasonable conversions are made in other cases.
    • if aRamCanvas has fewer channels than the TIFF file, then extra channels in the TIFF file are ignored
    • if aRamCanvas has more channels than the TIFF file, then extra channels of aRamCanvas are set to black
    • if aRamCanvas and the TIFF have different channel widths, then the TIFF data is scaled (TIFF data is assumed to be full scale. Max tags are ignored)
  • Some effort is taken to do the right thing with respect to aRamCanvas axis orientation
Parameters
fileNameThe file name from which to read data from.
Return values
0Image file loaded successfully
1File open (TIFFOpen) failure
2File missing TIFF tag: IMAGEWIDTH
3File missing TIFF tag: IMAGELENGTH
4File missing TIFF tag: SAMPLESPERPIXEL
5File missing TIFF tag: PLANARCONFIG
6File missing TIFF tag: PHOTOMETRIC
7File missing TIFF tag: BITSPERSAMPLE
8File of zero width
9File of zero height
10Allocation failed (temp image buffer)
11Read (TIFFReadRGBAImage) failure
12Canvas Allocation failed (insufficient width)
14Canvas Allocation failed (insufficient height)
15TIFF bps not 8, 16, 32, or 64
16Allocation failed (scan line buffer)
17Read (TIFFReadScanline) failure
18Sample Format is not unsigned integer or IEEE floating point
19File and ramCanvas samples per pixel (channel count) differs
20File and ramCanvas channel depth differ
21File and ramCanvas channel format (int vs float) differ
22Planar configuration is invalid (not 1 or 2)
32TIFF read support not provided in this compile

Definition at line 4505 of file ramCanvasTpl.hpp.

◆ writeTIFFfile() [1/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
template<class rcConT >
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::writeTIFFfile ( std::string fileName,
rcConT rcConverter,
bool markAlpha )
inline

Write a TIFF format image file.

Respects integer coordinate system orientation.

Why TIFF? TIFF is both broadly supported and flexible enough to represent almost every ramCanvas image type perfectly.

Use Cases (In order of priority)

  • Write a bit perfect TIFF representation of ramCanvas images
  • Simultaneously convert any ramCanvas into 24-bit truecolor RGB and write the resulting TIFF
  • Do all the above while simultaneously applying a homogeneous image filter

Limitations

  • Channels must be no more than 64-bits wide
  • No more than 2^16-1 channels
  • Image width no more than 2^32-1 (normally intCrdT limits this to 2^31-1)
  • Image height no more than 2^32-1 (normally intCrdT limits this to 2^31-1)
  • Image row data size (numPixX * colorT::bitsPerChan * colorT::channelCount / 8) must be less than 2^32-1 bytes
  • Image data must be less than 2^32-1 bytes

Limitations for bit perfect (toTRU is NULL) files:

  • Channels must be uint8_t, uint16_t, uint32_t, uint64_t, float (32-bit), or double (64-bit)
Parameters
fileNameThe file name to write data to
rcConverterAn rcConverter object instance
markAlphaIf an alpha channel is present, then mark it as such in the TIFF file.
Returns
Status of I/O
Return values
0Everything seems to have worked
2Image channels are too shallow for TIFF format
3Image channels are too deep for TIFF format
4Image has too few channels for TIFF format
5Image has too many channels for TIFF format
6Image has too few columns for TIFF format
7Image has too many columns for TIFF format
8Image has too few rows for TIFF format
9Image has too few rows for TIFF format
10Image rows are too large (too much data) for TIFF format
11Image is too large (too much data) for TIFF format

Definition at line 2948 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeTIFFfile() [2/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::writeTIFFfile ( std::string fileName,
bool markAlpha = true )
inline

Simplified overload for writeTIFFfile() that only requires the filename.

Definition at line 2938 of file ramCanvasTpl.hpp.

◆ writeTGAfile()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::writeTGAfile ( std::string fileName)
inline

Write a 24-bit (8-bit per channel) RGB, TGA format graphics file.

Respects integer coordinate system orientation.

Why TGA? TGA files are not well supported by modern software. When supported, it is normally only 8-bit RGBA. With these limitations one might ask why this function exists. I am a POV-Ray fan, and it uses a specialized TGA format for height maps. That's really it... One could use this function to dump out regular RGB images, but I suggest writeTIFFfile() for that.

Note TGA files are 8-bit files, and *_byte functions are used to convert channel values to 8-bit before being written.

Parameters
fileNameThe file name name to write data to
Returns
Status of I/O
Return values
0Everything seems to have worked
1File open failure
6Image of zero width
7Image too wide for TGA format (> 2^16-1)
8Image of zero height
9Image too tall for TGA format (> 2^16-1)

Definition at line 2835 of file ramCanvasTpl.hpp.

◆ readRAWfile()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::readRAWfile ( std::string fileName)

Read RAW file.

Warning
This function is experimental! Functionality and API are likely to change in the future.
Bug
Floating point data is read directly from disk as-is without regard for endianness. I have no plans to fix this because I'm not sure what a good fix looks like
Return values
0Image file loaded successfully
1File open failure
2NOT USED
3NOT USED
4NOT USED
5NOT USED
6NOT USED
7NOT USED
8File of zero width
9File of zero height
10NOT USED
11Read failure
12Canvas Allocation failed (insufficient width)
14Canvas Allocation failed (insufficient height)
15bps not 8, 16, 32, or 64
16NOT USED
17NOT USED
18Sample Format is not unsigned integer or IEEE floating point
19File and ramCanvas samples per pixel (channel count) differs
20File and ramCanvas channel depth differ
21File and ramCanvas channel format (int vs float) differ
22NOT USED
23File is signed integer or unsigned float
24File is missing MJRRAW magic number
25Image data read failure (file may have ended prematurely)
26Malformed header
27Image is too wide to be supported by ramCanvas
28Image is too tall to be supported by ramCanvas
29Error reading numbers in header
32NOT USED
33Image width missing from header
34Image height missing from header
35Image channel count missing from header
36Image channel depth missing from header

Definition at line 4338 of file ramCanvasTpl.hpp.

◆ writeRAWfile() [1/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
template<class rcConT >
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::writeRAWfile ( std::string fileName,
rcConT rcConverter )
inline

Write a MJRRAW file.

Respects integer coordinate system orientation.

Why? This simple file format is designed to house the more exotic images this library supports, and be easily consumed by many image processing and data visualization tools – usually via a feature referred to as a raw importer. ImageMagick, VisIT, ParaView, and ImageJ all can read this type of data. The header is exactly 100 bytes, ASCII, and contains two newlines. The idea being that one can do a 'head -n 2 FILENAME' on the image file, and get a human readable output of basic image info that also happens to be easy to parse. The first line of the header is the text "MJRRAW". The second line of the header consists of a sequence of values& value labels and followed by enough zero characters to pad to get to the 100 byte mark. That's 100 bytes for the two lines including the two newline characters. The values consist of uppercase letters and numbers, and each label is a single lower case letter. If a value is a number, then it is expressed as a decimal number in ASCII using – it may be zero padded. While the code in ramCanvasTpl doesn't make assumptions about the order of the header values, some of the example scripts require them to be in the following order: x, y, c, b, s, t, & i. The header is followed by the binary image.

Labels:

  • x: Number of pixels on X (horizontal axis) expressed as a zero padded, decimal integer
  • y: Number of pixels on Y (vertical axis) expressed as a zero padded, decimal integer
  • c: Number of channels expressed as a zero padded, decimal integer
  • b: Number of bits per channel expressed as a zero padded, decimal integer
  • s: Channel signdness (ignored for floating point channels)
    • UNS: Unsigned data. DEFAULT VALUE.
    • SGN: Signed data
  • t: Channel type
    • INT: Integral channels. DEFAULT VALUE.
    • FLT: Floating point channels
  • i: endianness
    • BIG: Big endian
    • LTL: Little endian
    • UNK: Unknown. DEFAULT VALUE. For read we assume file matches system running the code.
  • Currently reserved, but unused labels
    • p: Pixel format
      • MXL: Each pixel of the image is written in sequence. DEFAULT VALUE.
      • PLN: Each channel of the image is written in sequence.
      • BIT: For bit-masks with 8 bits packed in a byte.
    • z: Compression
      • 000: No compression. DEFAULT VALUE.
      • ZLB: Zlib.
      • GZP: Gzip.

Two headers that both specify a 256x128 image with 3 unsigned 8-bit integer channels encoded little endian:

        MJRRAW
        256x128y3c8bUNSsINTtLTLi00000000000000000000000000000000000000000000000000000000000000000000

        MJRRAW
        0000000000000000256x0000000000000000128y000000000000000000000000003c00000000008bSGNsINTtLTLi
Parameters
fileNameThe file name name to write data to
rcConverterAn rcConverter object instance
Return values
0The write was successful.
1Could not open file.

Definition at line 2898 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getNumPixX().

Here is the call graph for this function:

◆ writeRAWfile() [2/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::writeRAWfile ( std::string fileName)
inline

Simplified overload for writeRAWfile() that only requires the filename.

Definition at line 2888 of file ramCanvasTpl.hpp.

◆ isCliped() [1/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isCliped ( fltCrdT x,
fltCrdT y ) const
inline

Determine if the given point is within the bounds of the ramCanvasTpl.

Parameters
xThe x coordinate of the point to test
yThe y coordinate of the point to test
Returns
Returns true if the point would be clipped.

Definition at line 1537 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isCliped().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isCliped().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isCliped() [2/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isCliped ( intCrdT x,
intCrdT y ) const
inline

Definition at line 1538 of file ramCanvasTpl.hpp.

◆ isOnCanvas() [1/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isOnCanvas ( fltCrdT x,
fltCrdT y ) const
inline

Determine if the given point is within the bounds of the ramCanvasTpl.

Parameters
xThe x coordinate of the point to test
yThe y coordinate of the point to test
Returns
Returns true if the point would be not be clipped.

Definition at line 1544 of file ramCanvasTpl.hpp.

◆ isOnCanvas() [2/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
int mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isOnCanvas ( intCrdT x,
intCrdT y ) const
inline

Definition at line 1545 of file ramCanvasTpl.hpp.

◆ real2intX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::real2intX ( fltCrdT x) const
inline

Convert real x coordinate to integral x coordinate.

Parameters
xThe real x coordinate value to be converted.
Returns
The integer x coordinate corresponding to the given x coordinate

Definition at line 3162 of file ramCanvasTpl.hpp.

◆ real2intY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::real2intY ( fltCrdT y) const
inline

Convert real y coordinate to integral y coordinate.

Parameters
yThe real y coordinate value to be converted.
Returns
The integer y coordinate corresponding to the given y coordinate

Definition at line 3173 of file ramCanvasTpl.hpp.

◆ int2realX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::int2realX ( intCrdT x)
inline

Convert integral x coordinate to real x coordinate.

Parameters
xThe integer x coordinate value to be converted.
Returns
The real x coordinate corresponding to the given x coordinate

Definition at line 3184 of file ramCanvasTpl.hpp.

◆ int2realY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::int2realY ( intCrdT y)
inline

Convert integral y coordinate to real y coordinate.

Parameters
yThe integer y coordinate value to be converted.
Returns
The real y coordinate corresponding to the given y coordinate

Definition at line 3195 of file ramCanvasTpl.hpp.

◆ int2real()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
pointFltType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::int2real ( intCrdT x,
intCrdT y )
inline

Convert real x & y coordinates to integer x & y coordinates.

Parameters
xThe integer x coordinate value to be converted.
yThe integer y coordinate value to be converted.
Returns
The real x & y coordinates corresponding to the given integer x & y coordinates

Definition at line 1581 of file ramCanvasTpl.hpp.

◆ real2int()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
pointIntType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::real2int ( intCrdT x,
intCrdT y )
inline

Convert integer x & y coordinates to real x & y coordinates.

Parameters
xThe real x coordinate value to be converted.
yThe real y coordinate value to be converted.
Returns
The integer x & y coordinates corresponding to the given real x & y coordinates

Definition at line 1586 of file ramCanvasTpl.hpp.

◆ int2corner() [1/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
pointFltType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::int2corner ( intCrdT x,
intCrdT y,
int cornerX,
int cornerY )
inline

Given integer x & y coordinates, produce real x & y coordinates for one of the pixel's corners.

Warning
This function is experimental! Functionality and API are likely to change in the future.
Parameters
xThe integer x coordinate value to be converted.
yThe integer y coordinate value to be converted.
cornerXThe integer x coordinate of the corner – should be 0 or 1.
cornerYThe integer y coordinate of the corner – should be 0 or 1.
Returns
The real x & y coordinates corresponding to the requested corner

Definition at line 1606 of file ramCanvasTpl.hpp.

◆ int2corner() [2/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
pointFltType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::int2corner ( intCrdT x,
intCrdT y,
int cornerIndex )
inline

Given integer x & y coordinates and a corner index, produce real x & y coordinates for one of the pixel's corners.

Warning
This function is experimental! Functionality and API are likely to change in the future.
Parameters
xThe integer x coordinate value to be converted.
yThe integer y coordinate value to be converted.
cornerIndexCorner index. 0 => (0, 0); 1 => (0, 1); 2 => (1, 0); 3 => (1, 1);
Returns
The real x & y coordinates corresponding to the requested corner

Definition at line 1615 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::int2corner().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::int2corner().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ realDelta2intX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::realDelta2intX ( fltCrdT x) const
inline

Convert real distance on the x coordinate axis to an integral distance.

Parameters
xThe real delta x to be converted
Returns
integer delta x

Definition at line 1625 of file ramCanvasTpl.hpp.

◆ realDelta2intY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::realDelta2intY ( fltCrdT y) const
inline

Convert real distance on the y coordinate axis to an integral distance.

Parameters
yThe real delta y to be converted
Returns
integer delta y

Definition at line 1630 of file ramCanvasTpl.hpp.

◆ intDelta2realX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intDelta2realX ( intCrdT x) const
inline

Convert integral distance on the x coordinate to a real distance.

Parameters
xThe real x coordinate value to be converted.
Returns
The integer x coordinate corresponding to the given x coordinate

Definition at line 1635 of file ramCanvasTpl.hpp.

◆ intDelta2realY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intDelta2realY ( intCrdT y) const
inline

Convert integral distance on the y coordinate to a real distance.

Parameters
yreal y coordinate value to be converted.
Returns
The integer y coordinate corresponding to the given y coordinate

Definition at line 1640 of file ramCanvasTpl.hpp.

◆ getRealAxOrientationX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
realAxisOrientation mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getRealAxOrientationX ( )
inline

Get the real X axis orientation.

Returns
INVERTED means inverted with respect to the integer axis, and NATURAL otherwise.

Definition at line 1649 of file ramCanvasTpl.hpp.

◆ setRealAxOrientationX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::setRealAxOrientationX ( realAxisOrientation orientation)
inline

Set the real X axis orientation.

Parameters
orientationThe orientation (INVERTED or NATURAL)

Definition at line 1653 of file ramCanvasTpl.hpp.

◆ getRealAxOrientationY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
realAxisOrientation mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getRealAxOrientationY ( )
inline

Get the real Y axis orientation.

Returns
INVERTED means inverted with respect to the integer axis, and NATURAL otherwise.

Definition at line 1657 of file ramCanvasTpl.hpp.

◆ setRealAxOrientationY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::setRealAxOrientationY ( realAxisOrientation orientation)
inline

Set the real Y axis orientation.

Parameters
orientationThe orientation (INVERTED or NATURAL)

Definition at line 1661 of file ramCanvasTpl.hpp.

◆ setRealAxisDefaultOrientation()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::setRealAxisDefaultOrientation ( )
inline

Set the real axis orientation to default (NATURAL for both X and Y axes)

Definition at line 1664 of file ramCanvasTpl.hpp.

◆ getDrawMode()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
drawModeType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getDrawMode ( )
inline

Get the current drawing mode.

Returns
The drawing mode

Definition at line 1673 of file ramCanvasTpl.hpp.

◆ setDrawMode()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::setDrawMode ( drawModeType newDrawMode)
inline

Set the current drawing mode NOOP if enableDrawModes is false.

Parameters
newDrawModeThe drawing mode

Definition at line 1678 of file ramCanvasTpl.hpp.

◆ setDefaultDrawMode()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::setDefaultDrawMode ( )
inline

Set the default draw mode.

Definition at line 1681 of file ramCanvasTpl.hpp.

◆ getIntAxOrientationX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intAxisOrientation mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getIntAxOrientationX ( )
inline

Get the integer X axis orientation.

Returns
NATURAL means increasing to the right.

Definition at line 1690 of file ramCanvasTpl.hpp.

◆ isIntAxOrientationNaturalX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
bool mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isIntAxOrientationNaturalX ( )
inline

Is the integer X axis NATURAL?

Returns
true means increasing to the right.

Definition at line 1694 of file ramCanvasTpl.hpp.

◆ setIntAxOrientationX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::setIntAxOrientationX ( intAxisOrientation orientation)
inline

Set the integer X axis orientation.

Parameters
orientationThe orientation (INVERTED or NATURAL)

Definition at line 1698 of file ramCanvasTpl.hpp.

◆ isIntAxOrientationNaturalY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
bool mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isIntAxOrientationNaturalY ( )
inline

Get the integer Y axis orientation.

Returns
NATURAL means increasing in the upward direction.

Definition at line 1702 of file ramCanvasTpl.hpp.

◆ getIntAxOrientationY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intAxisOrientation mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getIntAxOrientationY ( )
inline

Is the integer Y axis orientation NATURAL?

Returns
NATURAL means increasing in the upward direction.

Definition at line 1706 of file ramCanvasTpl.hpp.

◆ setIntAxOrientationY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::setIntAxOrientationY ( intAxisOrientation orientation)
inline

Set the integer Y axis orientation.

Parameters
orientationThe orientation (INVERTED or NATURAL)

Definition at line 1710 of file ramCanvasTpl.hpp.

◆ setIntAxisDefaultOrientation()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::setIntAxisDefaultOrientation ( )
inline

Set the integer axis orientation to default (NATURAL for both X and Y axes)

Definition at line 1713 of file ramCanvasTpl.hpp.

◆ getNumPixX()

◆ getNumPixY()

◆ getPixels()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
colorT * mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPixels ( )
inline

Returns a pointer to the raw pixel store.

This generally violates the ramCanvasTpl object interface; however, this may be required for performance.

Returns
The number a pointer to the raw pixel store.

Definition at line 1729 of file ramCanvasTpl.hpp.

◆ clonePixels()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
colorT * mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::clonePixels ( )

Return a clone (a copy) of the raw pixel store.

This function copies the internal pixel store and returns a pointer to this copy.

Returns
Pointer to a copy of the raw pixel store.

Definition at line 3206 of file ramCanvasTpl.hpp.

◆ getMinRealX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getMinRealX ( )
inline

x coord of min (real coord)

Definition at line 1741 of file ramCanvasTpl.hpp.

◆ getMaxRealX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getMaxRealX ( )
inline

x coord of max (real coord)

Definition at line 1742 of file ramCanvasTpl.hpp.

◆ getMinRealY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getMinRealY ( )
inline

y coord of min (real coord)

Definition at line 1743 of file ramCanvasTpl.hpp.

◆ getMaxRealY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getMaxRealY ( )
inline

y coord of max (real coord)

Definition at line 1744 of file ramCanvasTpl.hpp.

◆ getPixWidX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPixWidX ( )
inline

Width of a pixel (real coord)

Definition at line 1745 of file ramCanvasTpl.hpp.

◆ getPixWidY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPixWidY ( )
inline

Height of a pixel (real coord)

Definition at line 1746 of file ramCanvasTpl.hpp.

◆ getCanvasWidX()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getCanvasWidX ( )
inline

Width of the display (real coord)

Definition at line 1747 of file ramCanvasTpl.hpp.

◆ getCanvasWidY()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getCanvasWidY ( )
inline

height of the display(real coord)

Definition at line 1748 of file ramCanvasTpl.hpp.

◆ getCanvasWidD()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getCanvasWidD ( )
inline

Width of the display (real coord)

Definition at line 1749 of file ramCanvasTpl.hpp.

◆ getPxColor() [1/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor ( intCrdT x,
intCrdT y ) const
inline

Returns a copy of the color at the given coordinates.

Definition at line 3217 of file ramCanvasTpl.hpp.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::combineRamCanvasBinOp().

Here is the caller graph for this function:

◆ getPxColor() [2/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor ( fltCrdT x,
fltCrdT y ) const
inline

Definition at line 1758 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor().

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPxColor() [3/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor ( pointIntType thePoint) const
inline

Definition at line 1759 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPxColor() [4/4]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor ( pointFltType thePoint) const
inline

Definition at line 1760 of file ramCanvasTpl.hpp.

References mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor(), mjr::point2d< coordT >::x, and mjr::point2d< coordT >::y.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColor().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPxColorInterpolate()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorInterpolate ( double x,
double y,
interpolationType interpMethod = interpolationType::BILINEAR )
inline

Returns the interpolated color value at the the given coordinates using the given interpolation method.

Parameters
xThe x coordinate (the type is double, but the coordinate is in the integer coordinate space. i.e. x=1.5 is between x=1 and x=2)
yThe y coordinate
interpMethodThe interpolation method (default: interpolationType::BILINEAR)
Returns
Interpolated color value

Definition at line 3228 of file ramCanvasTpl.hpp.

◆ getPxColorInterpBLin()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorInterpBLin ( double x,
double y )

Returns the bilinear interpolated color value at the the given coordinates.

Parameters
xThe x coordinate (the type is double, but the coordinate is in the integer coordinate space. i.e. x=1.5 is between x=1 and x=2)
yThe y coordinate
Returns
Interpolated color value

Definition at line 3243 of file ramCanvasTpl.hpp.

◆ getPxColorInterpTrunc()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorInterpTrunc ( double x,
double y )
inline

Returns the truncated interpolated color value at the the given coordinates.

Parameters
xThe x coordinate (the type is double, but the coordinate is in the integer coordinate space. i.e. x=1.5 is between x=1 and x=2)
yThe y coordinate
Returns
Interpolated color value

Definition at line 3282 of file ramCanvasTpl.hpp.

◆ getPxColorInterpNear()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorInterpNear ( double x,
double y )
inline

Returns the nearest neighbor interpolated color value at the the given coordinates.

Parameters
xThe x coordinate (the type is double, but the coordinate is in the integer coordinate space. i.e. x=1.5 is between x=1 and x=2)
yThe y coordinate
Returns
Interpolated color value

Definition at line 3290 of file ramCanvasTpl.hpp.

◆ getPxColorInterpAvg4()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorInterpAvg4 ( double x,
double y )

Returns the average 4 interpolated color value at the the given coordinates.

Parameters
xThe x coordinate (the type is double, but the coordinate is in the integer coordinate space. i.e. x=1.5 is between x=1 and x=2)
yThe y coordinate
Returns
Interpolated color value

Definition at line 3322 of file ramCanvasTpl.hpp.

◆ getPxColorInterpAvg9()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorInterpAvg9 ( double x,
double y )
inline

Returns the average 9 interpolated color value at the the given coordinates.

Parameters
xThe x coordinate (the type is double, but the coordinate is in the integer coordinate space. i.e. x=1.5 is between x=1 and x=2)
yThe y coordinate
Returns
Interpolated color value

Definition at line 3298 of file ramCanvasTpl.hpp.

◆ drawPointNC()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPointNC ( intCrdT x,
intCrdT y,
colorArgType color )
inline

The functions here work in a similar way to the non-NC functions, but with no clipping or bounds checking.

Thus, if an argument would cause something to be drawn beyond the bounds of the ramCanvasTpl, a core dump will most certainly result. The intent is to provide less overhead for very careful code that handles clipping and error checking by itself – a good line drawing algorithm for example. Draw a point with no clipping or bounds checking.

Parameters
xThe x coordinate of the point to be drawn
yThe y coordinate of the point to be drawn
colorThe color to draw the point.

Definition at line 4089 of file ramCanvasTpl.hpp.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevAff(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevArb(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevBiPoly(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::geomTfrmRevRPoly().

Here is the caller graph for this function:

◆ getPxColorNC()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorNC ( intCrdT x,
intCrdT y ) const
inline

Get the default point to the specified coordinates with no clipping or bounds checking.

Parameters
xThe x coordinate of the point
yThe y coordinate of the point

Definition at line 1821 of file ramCanvasTpl.hpp.

◆ getPxColorRefNC()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
colorT & mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::getPxColorRefNC ( intCrdT x,
intCrdT y ) const
inline

Returns a reference to the color object for the given pixel with no clipping or bounds checking.

Parameters
xThe x coordinate of the point
yThe y coordinate of the point
Returns
Reference to the color object associated with the specified point

Definition at line 1827 of file ramCanvasTpl.hpp.

Referenced by mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::insertCanvas(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isClose(), mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::isEqual(), and mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::ramCanvasTpl().

Here is the caller graph for this function:

◆ drawHorzLineNC()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawHorzLineNC ( intCrdT xMin,
intCrdT xMax,
intCrdT yConst,
colorArgType color )
inline

Draw a horizontal line with no clipping or bounds checking.

Parameters
xMinThe MINIMUM x coordinate of the line to be drawn
xMaxThe MAXIMUM x coordinate of the line to be drawn
yConstThe y coordinate at which the line is to be drawn
colorThe color to draw the line

Definition at line 1834 of file ramCanvasTpl.hpp.

◆ drawVertLineNC()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawVertLineNC ( intCrdT yMin,
intCrdT yMax,
intCrdT xConst,
colorArgType color )
inline

Draw a vertical line with no clipping or bounds checking.

Parameters
yMinThe MINIMUM y coordinate of the line to be drawn
yMaxThe MAXIMUM y coordinate of the line to be drawn
xConstThe x coordinate at which the line is to be drawn
colorThe color to draw the line

Definition at line 1841 of file ramCanvasTpl.hpp.

◆ drawPointS()

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawPointS ( intCrdT x,
intCrdT y,
colorArgType color )
inline

Draw a point without any special drawing options.

It simply sets the pixel to the given color. In addition, no clipping or bounds checking is performed. Thus, if an argument would cause something to be drawn beyond the bounds of the ramCanvasTpl, a segfault will most certainly result. The intent is to provide a less overhead for very careful code that handles clipping and error checking and drawing options by itself – an image filter algorithm for example. Note that enableDrawModes is ignored.

Parameters
xThe x coordinate of the point
yThe y coordinate of the point
colorThe color with which to draw the point

Definition at line 1856 of file ramCanvasTpl.hpp.

◆ colorizeFltCanvas() [1/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorizeFltCanvas ( std::function< colorT(fltCrdT, fltCrdT)> cFun)

Definition at line 2779 of file ramCanvasTpl.hpp.

◆ colorizeFltCanvas() [2/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorizeFltCanvas ( std::function< colorT(pointFltType)> cFun)

Definition at line 2794 of file ramCanvasTpl.hpp.

◆ colorizeIntCanvas() [1/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorizeIntCanvas ( std::function< colorT(intCrdT, intCrdT)> cFun)

Definition at line 2808 of file ramCanvasTpl.hpp.

◆ colorizeIntCanvas() [2/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
requires (std::is_integral<intCrdT>::value && std::is_signed<intCrdT>::value && std::is_floating_point<fltCrdT>::value)
void mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::colorizeIntCanvas ( std::function< colorT(pointIntType)> cFun)

Definition at line 2821 of file ramCanvasTpl.hpp.

◆ statNumNonZeroPixels() [1/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::statNumNonZeroPixels ( intCrdT x1,
intCrdT y1,
intCrdT x2,
intCrdT y2 )
inline

Definition at line 1881 of file ramCanvasTpl.hpp.

◆ statNumNonZeroPixels() [2/2]

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::statNumNonZeroPixels ( )
inline

Definition at line 1897 of file ramCanvasTpl.hpp.

Member Data Documentation

◆ intCrdMax

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
const intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intCrdMax = (1ul << ((sizeof(intCrdT)*CHAR_BIT-1)/2)) - 3
static

maximum for numPixX, numPixY, & numPix.

Definition at line 306 of file ramCanvasTpl.hpp.

◆ intCrdGrdMax

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
const intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intCrdGrdMax = intCrdMax+1
staticprivate

Large sentinel value (always off canvas)

Definition at line 325 of file ramCanvasTpl.hpp.

◆ intCrdGrdMin

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
const intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intCrdGrdMin = -1
staticprivate

Small sentinel value (always off canvas)

Definition at line 326 of file ramCanvasTpl.hpp.

◆ numPixX

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::numPixX
private

◆ numPixY

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::numPixY
private

◆ numPix

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::numPix
private

Number of pixels.

Definition at line 334 of file ramCanvasTpl.hpp.

◆ minRealX

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::minRealX
private

◆ maxRealX

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::maxRealX
private

◆ minRealY

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::minRealY
private

◆ maxRealY

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::maxRealY
private

◆ pixWidX

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pixWidX
private

Width of a pixel (real coord)

Definition at line 349 of file ramCanvasTpl.hpp.

◆ pixWidY

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pixWidY
private

Height of a pixel (real coord)

Definition at line 350 of file ramCanvasTpl.hpp.

◆ canvasWidX

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::canvasWidX
private

Width of the canvas (real coord)

Definition at line 352 of file ramCanvasTpl.hpp.

◆ canvasWidY

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
fltCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::canvasWidY
private

height of the canvas (real coord)

Definition at line 353 of file ramCanvasTpl.hpp.

◆ realAxOrientationX

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
realAxisOrientation mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::realAxOrientationX
private

◆ realAxOrientationY

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
realAxisOrientation mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::realAxOrientationY
private

◆ intAxOrientationX

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intAxisOrientation mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intAxOrientationX
private

◆ intAxOrientationY

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intAxisOrientation mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::intAxOrientationY
private

◆ pixels

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
colorT* mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pixels
private

◆ pixelsE

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
colorT* mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::pixelsE
private

◆ dfltColor

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
colorT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::dfltColor
private

Default color.

Definition at line 375 of file ramCanvasTpl.hpp.

◆ drawMode

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
drawModeType mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::drawMode
private

◆ dfltX

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::dfltX
private

x coordinate used by default.

Definition at line 377 of file ramCanvasTpl.hpp.

◆ dfltY

template<class colorT , class intCrdT , class fltCrdT , bool enableDrawModes>
intCrdT mjr::ramCanvasTpl< colorT, intCrdT, fltCrdT, enableDrawModes >::dfltY
private

y coordinate used by default.

Definition at line 378 of file ramCanvasTpl.hpp.


The documentation for this class was generated from the following file: