mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-01 00:35:33 +00:00
lottie/vector: added reset() api to VRle class.
Change-Id: Iace73912f6ab4510c0adb15387029e2038ad15be
This commit is contained in:
@@ -291,6 +291,7 @@ public:
|
||||
void translate(const VPoint &pt);
|
||||
void opAdd(const VRleImpl &other, VRleImpl &res);
|
||||
VRect bbox();
|
||||
void reset();
|
||||
|
||||
public:
|
||||
VRect m_bbox;
|
||||
@@ -327,6 +328,14 @@ VRect VRleImpl::bbox()
|
||||
return m_bbox;
|
||||
}
|
||||
|
||||
void VRleImpl::reset()
|
||||
{
|
||||
m_spans.clear();
|
||||
m_bbox = VRect();
|
||||
mOffset = VPoint();
|
||||
mBboxDirty = false;
|
||||
}
|
||||
|
||||
void VRleImpl::translate(const VPoint &pt)
|
||||
{
|
||||
// take care of last offset if applied
|
||||
@@ -759,6 +768,12 @@ const VRle::Span *VRle::data() const
|
||||
return d->impl.m_spans.data();
|
||||
}
|
||||
|
||||
void VRle::reset()
|
||||
{
|
||||
detach();
|
||||
d->impl.reset();
|
||||
}
|
||||
|
||||
VRle VRle::toRle(const VRect &rect)
|
||||
{
|
||||
if (rect.isEmpty()) return VRle();
|
||||
|
||||
@@ -35,6 +35,7 @@ public:
|
||||
VRle &intersect(const VRect &r);
|
||||
int size() const;
|
||||
const VRle::Span * data() const;
|
||||
void reset();
|
||||
VRle operator~() const;
|
||||
VRle operator+(const VRle &o) const;
|
||||
VRle operator-(const VRle &o) const;
|
||||
|
||||
Reference in New Issue
Block a user