JX Application Framework
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
JImageMask Class Referenceabstract

#include <JImageMask.h>

Inheritance diagram for JImageMask:
[legend]

Public Member Functions

 JImageMask ()
 
virtual ~JImageMask ()
 
virtual bool ContainsPixel (const JCoordinate x, const JCoordinate y) const =0
 
virtual void AddPixel (const JCoordinate x, const JCoordinate y)=0
 
virtual void RemovePixel (const JCoordinate x, const JCoordinate y)=0
 

Protected Member Functions

 JImageMask (const JImageMask &source)
 
void CalcMask (const JImage &image, const JColorID color)
 

Detailed Description

Pure virtual base class to represent a mask for an offscreen picture.

Constructor & Destructor Documentation

◆ JImageMask() [1/2]

JImageMask::JImageMask ( )

◆ ~JImageMask()

JImageMask::~JImageMask ( )
virtual

◆ JImageMask() [2/2]

JImageMask::JImageMask ( const JImageMask source)
protected

Member Function Documentation

◆ AddPixel()

virtual void JImageMask::AddPixel ( const JCoordinate  x,
const JCoordinate  y 
)
pure virtual

Implemented in JXImageMask.

◆ CalcMask()

void JImageMask::CalcMask ( const JImage image,
const JColorID  color 
)
protected
We must be the same size as the image.

Note that by comparing system dependent colors instead of JColorIndices, we run in O(W H) instead of O(W H C), where C is the number of colors in the colorManager. The disadvantage is that system colors may be approximate so two colors close together will have the same system value, but different JColorIndices. For masking, this should not be a problem, however, because one usually masks out a color that is very different from the other colors in the image.

◆ ContainsPixel()

virtual bool JImageMask::ContainsPixel ( const JCoordinate  x,
const JCoordinate  y 
) const
pure virtual

Implemented in JXImageMask.

◆ RemovePixel()

virtual void JImageMask::RemovePixel ( const JCoordinate  x,
const JCoordinate  y 
)
pure virtual

Implemented in JXImageMask.


The documentation for this class was generated from the following files: