Krita Source Code Documentation
Loading...
Searching...
No Matches
KisDabRenderingJob Class Reference

#include <KisDabRenderingJob.h>

Public Types

enum  JobType { Dab , Postprocess , Copy }
 
enum  Status { New , Running , Completed }
 

Public Member Functions

QPoint dstDabOffset () const
 
 KisDabRenderingJob (const KisDabRenderingJob &rhs)
 
 KisDabRenderingJob (int _seqNo, JobType _type, qreal opacity=OPACITY_OPAQUE_F, qreal flow=OPACITY_OPAQUE_F)
 
KisDabRenderingJoboperator= (const KisDabRenderingJob &rhs)
 

Public Attributes

qreal flow = OPACITY_OPAQUE_F
 
KisDabCacheUtils::DabGenerationInfo generationInfo
 
qreal opacity = OPACITY_OPAQUE_F
 
KisFixedPaintDeviceSP originalDevice
 
KisFixedPaintDeviceSP postprocessedDevice
 
int seqNo = -1
 
Status status = New
 
JobType type = Dab
 

Detailed Description

Definition at line 19 of file KisDabRenderingJob.h.

Member Enumeration Documentation

◆ JobType

Enumerator
Dab 
Postprocess 
Copy 

Definition at line 22 of file KisDabRenderingJob.h.

◆ Status

Enumerator
New 
Running 
Completed 

Definition at line 28 of file KisDabRenderingJob.h.

Constructor & Destructor Documentation

◆ KisDabRenderingJob() [1/2]

KisDabRenderingJob::KisDabRenderingJob ( int _seqNo,
KisDabRenderingJob::JobType _type,
qreal opacity = OPACITY_OPAQUE_F,
qreal flow = OPACITY_OPAQUE_F )

Definition at line 19 of file KisDabRenderingJob.cpp.

20 : seqNo(_seqNo)
21 , type(_type)
22 , opacity(_opacity)
23 , flow(_flow)
24{
25}

◆ KisDabRenderingJob() [2/2]

KisDabRenderingJob::KisDabRenderingJob ( const KisDabRenderingJob & rhs)

Definition at line 27 of file KisDabRenderingJob.cpp.

28 : seqNo(rhs.seqNo),
30 type(rhs.type),
33 status(rhs.status),
34 opacity(rhs.opacity),
35 flow(rhs.flow)
36{
37}
KisFixedPaintDeviceSP postprocessedDevice
KisFixedPaintDeviceSP originalDevice
KisDabCacheUtils::DabGenerationInfo generationInfo

Member Function Documentation

◆ dstDabOffset()

QPoint KisDabRenderingJob::dstDabOffset ( ) const

Recenter generated low-res dab around the center of the ideal theoretical dab rect

Definition at line 53 of file KisDabRenderingJob.cpp.

54{
57 const QPoint p1 = generationInfo.dstDabRect.topLeft();
58 const QPoint s1 = QPoint(generationInfo.dstDabRect.width(),
59 generationInfo.dstDabRect.height());
60 const QPoint s2 = QPoint(postprocessedDevice->bounds().width(),
61 postprocessedDevice->bounds().height());
62 return p1 + (s1 - s2) / 2;
63}
QPointF s1
QPointF s2
QPointF p1

References KisFixedPaintDevice::bounds(), KisDabCacheUtils::DabGenerationInfo::dstDabRect, generationInfo, p1, postprocessedDevice, s1, and s2.

◆ operator=()

KisDabRenderingJob & KisDabRenderingJob::operator= ( const KisDabRenderingJob & rhs)

Definition at line 39 of file KisDabRenderingJob.cpp.

40{
41 seqNo = rhs.seqNo;
43 type = rhs.type;
46 status = rhs.status;
47 opacity = rhs.opacity;
48 flow = rhs.flow;
49
50 return *this;
51}

References flow, generationInfo, opacity, originalDevice, postprocessedDevice, seqNo, status, and type.

Member Data Documentation

◆ flow

qreal KisDabRenderingJob::flow = OPACITY_OPAQUE_F

Definition at line 52 of file KisDabRenderingJob.h.

◆ generationInfo

KisDabCacheUtils::DabGenerationInfo KisDabRenderingJob::generationInfo

Definition at line 43 of file KisDabRenderingJob.h.

◆ opacity

qreal KisDabRenderingJob::opacity = OPACITY_OPAQUE_F

Definition at line 51 of file KisDabRenderingJob.h.

◆ originalDevice

KisFixedPaintDeviceSP KisDabRenderingJob::originalDevice

Definition at line 45 of file KisDabRenderingJob.h.

◆ postprocessedDevice

KisFixedPaintDeviceSP KisDabRenderingJob::postprocessedDevice

Definition at line 46 of file KisDabRenderingJob.h.

◆ seqNo

int KisDabRenderingJob::seqNo = -1

Definition at line 42 of file KisDabRenderingJob.h.

◆ status

Status KisDabRenderingJob::status = New

Definition at line 49 of file KisDabRenderingJob.h.

◆ type

JobType KisDabRenderingJob::type = Dab

Definition at line 44 of file KisDabRenderingJob.h.


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