Changeset View
Changeset View
Standalone View
Standalone View
lib/redeyereduction/redeyereductionimageoperation.cpp
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 94 | { | |||
---|---|---|---|---|---|
99 | QImage img = document()->image(); | 99 | QImage img = document()->image(); | ||
100 | { | 100 | { | ||
101 | QPainter painter(&img); | 101 | QPainter painter(&img); | ||
102 | painter.setCompositionMode(QPainter::CompositionMode_Source); | 102 | painter.setCompositionMode(QPainter::CompositionMode_Source); | ||
103 | QRect rect = PaintUtils::containingRect(d->mRectF); | 103 | QRect rect = PaintUtils::containingRect(d->mRectF); | ||
104 | painter.drawImage(rect.topLeft(), d->mOriginalImage); | 104 | painter.drawImage(rect.topLeft(), d->mOriginalImage); | ||
105 | } | 105 | } | ||
106 | document()->editor()->setImage(img); | 106 | document()->editor()->setImage(img); | ||
107 | finishUndoJob(); | ||||
107 | } | 108 | } | ||
108 | 109 | | |||
109 | /** | 110 | /** | ||
110 | * This code is inspired from code found in a Paint.net plugin: | 111 | * This code is inspired from code found in a Paint.net plugin: | ||
111 | * http://paintdotnet.forumer.com/viewtopic.php?f=27&t=26193&p=205954&hilit=red+eye#p205954 | 112 | * http://paintdotnet.forumer.com/viewtopic.php?f=27&t=26193&p=205954&hilit=red+eye#p205954 | ||
112 | */ | 113 | */ | ||
113 | inline qreal computeRedEyeAlpha(const QColor& src) | 114 | inline qreal computeRedEyeAlpha(const QColor& src) | ||
114 | { | 115 | { | ||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |