Member functions that don't mutate their objects should be declared "const"
return (x != rhs.x || y != rhs.y);
}
return (x != rhs.x || y != rhs.y);
}
{
if (x == 0 && y == 0) return true;
else return false;
}
{
if (x == 0 && y == 0) return true;
else return false;
}
{
//2 is epsilon...
if (abs(x) < 2 && abs(y) < 2) return true;
{
//2 is epsilon...
if (abs(x) < 2 && abs(y) < 2) return true;
uint32_t opacity;
SwBBox bbox = {{0, 0}, {0, 0}}; //Whole Rendering Region
uint32_t opacity;
SwBBox bbox = {{0, 0}, {0, 0}}; //Whole Rendering Region
- void bounds(uint32_t* x, uint32_t* y, uint32_t* w, uint32_t* h)
+ void bounds(uint32_t* x, uint32_t* y, uint32_t* w, uint32_t* h) const
{
//Range over?
auto xx = bbox.min.x > 0 ? bbox.min.x : 0;
{
//Range over?
auto xx = bbox.min.x > 0 ? bbox.min.x : 0;
- bool viewbox(float* x, float* y, float* w, float* h)
+ bool viewbox(float* x, float* y, float* w, float* h) const
{
if (!loader) return false;
if (x) *x = loader->vx;
{
if (!loader) return false;
if (x) *x = loader->vx;
- bool bounds(float* x, float* y, float* w, float* h)
+ bool bounds(float* x, float* y, float* w, float* h) const
{
if (!paint) return false;
return paint->pImpl->bounds(x, y, w, h);
{
if (!paint) return false;
return paint->pImpl->bounds(x, y, w, h);
- bool bounds(RenderMethod& renderer, uint32_t* px, uint32_t* py, uint32_t* pw, uint32_t* ph)
+ bool bounds(RenderMethod& renderer, uint32_t* px, uint32_t* py, uint32_t* pw, uint32_t* ph) const
{
if (paints.count == 0) return false;
{
if (paints.count == 0) return false;
- bool bounds(float* px, float* py, float* pw, float* ph)
+ bool bounds(float* px, float* py, float* pw, float* ph) const
{
if (paints.count == 0) return false;
{
if (paints.count == 0) return false;
cmds[cmdCnt++] = PathCommand::Close;
}
cmds[cmdCnt++] = PathCommand::Close;
}
- bool bounds(float* x, float* y, float* w, float* h)
+ bool bounds(float* x, float* y, float* w, float* h) const
{
if (ptsCnt == 0) return false;
{
if (ptsCnt == 0) return false;