mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:17:36 +00:00
LibPDF: Propogate errors from ColorSpace::color()
This commit is contained in:
parent
e989008471
commit
9a0e1dde42
3 changed files with 25 additions and 25 deletions
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
virtual ~ColorSpace() = default;
|
||||
|
||||
virtual Color color(Vector<Value> const& arguments) const = 0;
|
||||
virtual PDFErrorOr<Color> color(Vector<Value> const& arguments) const = 0;
|
||||
virtual int number_of_components() const = 0;
|
||||
virtual Vector<float> default_decode() const = 0;
|
||||
virtual ColorSpaceFamily const& family() const = 0;
|
||||
|
@ -67,7 +67,7 @@ public:
|
|||
|
||||
~DeviceGrayColorSpace() override = default;
|
||||
|
||||
Color color(Vector<Value> const& arguments) const override;
|
||||
PDFErrorOr<Color> color(Vector<Value> const& arguments) const override;
|
||||
int number_of_components() const override { return 1; }
|
||||
Vector<float> default_decode() const override;
|
||||
ColorSpaceFamily const& family() const override { return ColorSpaceFamily::DeviceGray; }
|
||||
|
@ -82,7 +82,7 @@ public:
|
|||
|
||||
~DeviceRGBColorSpace() override = default;
|
||||
|
||||
Color color(Vector<Value> const& arguments) const override;
|
||||
PDFErrorOr<Color> color(Vector<Value> const& arguments) const override;
|
||||
int number_of_components() const override { return 3; }
|
||||
Vector<float> default_decode() const override;
|
||||
ColorSpaceFamily const& family() const override { return ColorSpaceFamily::DeviceRGB; }
|
||||
|
@ -97,7 +97,7 @@ public:
|
|||
|
||||
~DeviceCMYKColorSpace() override = default;
|
||||
|
||||
Color color(Vector<Value> const& arguments) const override;
|
||||
PDFErrorOr<Color> color(Vector<Value> const& arguments) const override;
|
||||
int number_of_components() const override { return 4; }
|
||||
Vector<float> default_decode() const override;
|
||||
ColorSpaceFamily const& family() const override { return ColorSpaceFamily::DeviceCMYK; }
|
||||
|
@ -112,7 +112,7 @@ public:
|
|||
|
||||
~CalRGBColorSpace() override = default;
|
||||
|
||||
Color color(Vector<Value> const& arguments) const override;
|
||||
PDFErrorOr<Color> color(Vector<Value> const& arguments) const override;
|
||||
int number_of_components() const override { return 3; }
|
||||
Vector<float> default_decode() const override;
|
||||
ColorSpaceFamily const& family() const override { return ColorSpaceFamily::CalRGB; }
|
||||
|
@ -132,7 +132,7 @@ public:
|
|||
|
||||
~ICCBasedColorSpace() override = default;
|
||||
|
||||
Color color(Vector<Value> const& arguments) const override;
|
||||
PDFErrorOr<Color> color(Vector<Value> const& arguments) const override;
|
||||
int number_of_components() const override { VERIFY_NOT_REACHED(); }
|
||||
Vector<float> default_decode() const override;
|
||||
ColorSpaceFamily const& family() const override { return ColorSpaceFamily::ICCBased; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue