Changeset View
Changeset View
Standalone View
Standalone View
commands/imagelib/transforms/kpTransformSkewCommand.cpp
Show First 20 Lines • Show All 68 Lines • ▼ Show 20 Line(s) | |||||
69 | } | 69 | } | ||
70 | 70 | | |||
71 | 71 | | |||
72 | // public virtual [base kpCommand] | 72 | // public virtual [base kpCommand] | ||
73 | QString kpTransformSkewCommand::name () const | 73 | QString kpTransformSkewCommand::name () const | ||
74 | { | 74 | { | ||
75 | QString opName = i18n ("Skew"); | 75 | QString opName = i18n ("Skew"); | ||
76 | 76 | | |||
77 | if (m_actOnSelection) | 77 | return (m_actOnSelection) ? i18n ("Selection: %1", opName) : opName; | ||
78 | return i18n ("Selection: %1", opName); | | |||
79 | else | | |||
80 | return opName; | | |||
81 | } | 78 | } | ||
82 | 79 | | |||
83 | 80 | | |||
84 | // public virtual [base kpCommand] | 81 | // public virtual [base kpCommand] | ||
85 | kpCommandSize::SizeType kpTransformSkewCommand::size () const | 82 | kpCommandSize::SizeType kpTransformSkewCommand::size () const | ||
86 | { | 83 | { | ||
87 | return ImageSize (m_oldImage) + | 84 | return ImageSize (m_oldImage) + | ||
88 | SelectionSize (m_oldSelectionPtr); | 85 | SelectionSize (m_oldSelectionPtr); | ||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 141 | { | |||
145 | // TODO: fix the latter "victim of" problem in kpAbstractImageSelection by | 142 | // TODO: fix the latter "victim of" problem in kpAbstractImageSelection by | ||
146 | // allowing the border width & height != pixmap width & height | 143 | // allowing the border width & height != pixmap width & height | ||
147 | // Or maybe autocrop? | 144 | // Or maybe autocrop? | ||
148 | #if DEBUG_KP_TOOL_SKEW | 145 | #if DEBUG_KP_TOOL_SKEW | ||
149 | qCDebug(kpLogCommands) << "kpTransformSkewCommand::execute() currentPoints.boundingRect=" | 146 | qCDebug(kpLogCommands) << "kpTransformSkewCommand::execute() currentPoints.boundingRect=" | ||
150 | << currentPoints.boundingRect () | 147 | << currentPoints.boundingRect () | ||
151 | << " newPixmap: w=" << newImage.width () | 148 | << " newPixmap: w=" << newImage.width () | ||
152 | << " h=" << newImage.height () | 149 | << " h=" << newImage.height () | ||
153 | << " (victim of rounding error and/or skewed-a-(rectangular)-pixmap-that-was-transparent-in-the-corners-making-sel-uselessly-bigger-than-needs-be))" | 150 | << " (victim of rounding error and/or skewed-a-(rectangular)-pixmap-that-was-transparent-in-the-corners-making-sel-uselessly-bigger-than-needs-be))"; | ||
154 | << endl; | | |||
155 | #endif | 151 | #endif | ||
156 | doc->setSelection ( | 152 | doc->setSelection ( | ||
157 | kpRectangularImageSelection ( | 153 | kpRectangularImageSelection ( | ||
158 | QRect (currentPoints.boundingRect ().x (), | 154 | QRect (currentPoints.boundingRect ().x (), | ||
159 | currentPoints.boundingRect ().y (), | 155 | currentPoints.boundingRect ().y (), | ||
160 | newImage.width (), | 156 | newImage.width (), | ||
161 | newImage.height ()), | 157 | newImage.height ()), | ||
162 | newImage, | 158 | newImage, | ||
Show All 37 Lines |