Krita Source Code Documentation
Loading...
Searching...
No Matches
KisFilterWeightsApplicator::LinePos Class Reference

#include <kis_filter_weights_applicator.h>

Public Member Functions

int end () const
 
 LinePos ()
 
 LinePos (int start, int size)
 
int size () const
 
int start () const
 
void unite (const LinePos &rhs)
 

Private Attributes

int m_size
 
int m_start
 

Detailed Description

Definition at line 137 of file kis_filter_weights_applicator.h.

Constructor & Destructor Documentation

◆ LinePos() [1/2]

KisFilterWeightsApplicator::LinePos::LinePos ( )
inline

◆ LinePos() [2/2]

KisFilterWeightsApplicator::LinePos::LinePos ( int start,
int size )
inline

Member Function Documentation

◆ end()

int KisFilterWeightsApplicator::LinePos::end ( ) const
inline

WARNING: be careful! This is not the same as QRect::right()! This is an equivalent of (QRect::right() + QRect::width()) or QRectF::right(), that is it points to the pixel after(!) the actual last pixel. See Qt docs for more info about this historical difference.

Definition at line 160 of file kis_filter_weights_applicator.h.

160 {
161 return m_start + m_size;
162 }

References m_size, and m_start.

◆ size()

int KisFilterWeightsApplicator::LinePos::size ( ) const
inline

Definition at line 164 of file kis_filter_weights_applicator.h.

164 {
165 return m_size;
166 }

References m_size.

◆ start()

int KisFilterWeightsApplicator::LinePos::start ( ) const
inline

Definition at line 149 of file kis_filter_weights_applicator.h.

149 {
150 return m_start;
151 }

References m_start.

◆ unite()

void KisFilterWeightsApplicator::LinePos::unite ( const LinePos & rhs)
inline

Definition at line 168 of file kis_filter_weights_applicator.h.

168 {
169 if (m_size > 0) {
170 int newStart = qMin(start(), rhs.start());
171 int newEnd = qMax(end(), rhs.end());
172
173 m_start = newStart;
174 m_size = newEnd - newStart;
175 } else {
176 m_start = rhs.start();
177 m_size = rhs.size();
178 }
179 }

References end(), m_size, m_start, size(), and start().

Member Data Documentation

◆ m_size

int KisFilterWeightsApplicator::LinePos::m_size
private

Definition at line 183 of file kis_filter_weights_applicator.h.

◆ m_start

int KisFilterWeightsApplicator::LinePos::m_start
private

Definition at line 182 of file kis_filter_weights_applicator.h.


The documentation for this class was generated from the following file: