Skip to content

Commit

Permalink
Define CAIRO_FORMAT_INVALID for old Cairo versions
Browse files Browse the repository at this point in the history
  • Loading branch information
zbjornson committed Dec 27, 2017
1 parent f264460 commit 6345b0e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/backend/Backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ class Backend : public Nan::ObjectWrap
virtual void setHeight(int height);

// Overridden by ImageBackend. SVG and PDF thus always return INVALID.
virtual cairo_format_t getFormat() { return CAIRO_FORMAT_INVALID; }
virtual cairo_format_t getFormat() {
#ifndef CAIRO_FORMAT_INVALID
// For old Cairo (CentOS) support
return static_cast<cairo_format_t>(-1);
#else
return CAIRO_FORMAT_INVALID;
#endif
}
};


Expand Down

0 comments on commit 6345b0e

Please sign in to comment.