return {x - rhs.x, y - rhs.y};
}
- bool operator==(const SwPoint& rhs ) const
+ bool operator==(const SwPoint& rhs) const
{
return (x == rhs.x && y == rhs.y);
}
b = -b;
s = -s;
}
- int64_t c = (a * b + 0x8000L ) >> 16;
+ int64_t c = (a * b + 0x8000L) >> 16;
return (s > 0) ? c : -c;
}
static bool _inverse(const Matrix* transform, Matrix* invM)
{
- // computes the inverse of a matrix m
+ //computes the inverse of a matrix m
auto det = transform->e11 * (transform->e22 * transform->e33 - transform->e32 * transform->e23) -
transform->e12 * (transform->e21 * transform->e33 - transform->e23 * transform->e31) +
transform->e13 * (transform->e21 * transform->e32 - transform->e22 * transform->e31);
auto clipSpans = clip->spans;
auto clipEnd = clip->spans + clip->size;
- while (spanCnt > 0 && spans < end ) {
+ while (spanCnt > 0 && spans < end) {
if (clipSpans == clipEnd) {
spans = end;
break;
clipSpans1++;
}
- while (spanCnt && spans < end ) {
+ while (spanCnt && spans < end) {
if (clipSpans > clipEnd) {
spans = end;
break;
auto maxx = minx + static_cast<int16_t>(bbox->max.x - bbox->min.x) - 1;
auto maxy = miny + static_cast<int16_t>(bbox->max.y - bbox->min.y) - 1;
- while (spanCnt && spans < end ) {
+ while (spanCnt && spans < end) {
if (spans->y > maxy) {
spans = end;
break;
left.ctrl1.x = cur.start.x + at * (cur.ctrl1.x - cur.start.x);
left.ctrl1.y = cur.start.y + at * (cur.ctrl1.y - cur.start.y);
- left.ctrl2.x = cur.ctrl1.x + at * (cur.ctrl2.x - cur.ctrl1.x); // temporary holding spot
- left.ctrl2.y = cur.ctrl1.y + at * (cur.ctrl2.y - cur.ctrl1.y); // temporary holding spot
+ left.ctrl2.x = cur.ctrl1.x + at * (cur.ctrl2.x - cur.ctrl1.x); //temporary holding spot
+ left.ctrl2.y = cur.ctrl1.y + at * (cur.ctrl2.y - cur.ctrl1.y); //temporary holding spot
cur.ctrl2.x = cur.ctrl2.x + at * (cur.end.x - cur.ctrl2.x);
cur.ctrl2.y = cur.ctrl2.y + at * (cur.end.y - cur.ctrl2.y);
image->format = PNG_FORMAT_BGRA;
buffer = static_cast<png_bytep>(malloc(PNG_IMAGE_SIZE((*image))));
if (!buffer) {
- // out of memory, only time when libpng doesnt free its data
+ //out of memory, only time when libpng doesnt free its data
png_image_free(image);
return false;
}