Skip to content

Commit

Permalink
add bitmap valid check
Browse files Browse the repository at this point in the history
  • Loading branch information
sammycage committed Jan 18, 2021
1 parent e6eb1c3 commit b60e07d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/svgelement.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Bitmap
std::uint32_t width() const;
std::uint32_t height() const;
std::uint32_t stride() const;
bool valid() const;

private:
struct Impl;
Expand Down
5 changes: 5 additions & 0 deletions source/svgelement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ std::uint32_t Bitmap::stride() const
return m_impl ? m_impl->stride : 0;
}

bool Bitmap::valid() const
{
return !!m_impl;
}

SVGElement::SVGElement(SVGDocument* document)
: m_document(document)
{
Expand Down

0 comments on commit b60e07d

Please sign in to comment.