Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
bd2e393d
Commit
bd2e393d
authored
Apr 13, 2012
by
shibakaneki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Done autoscal in mirroring
parent
33d2bfab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
UBGraphicsDelegateFrame.cpp
src/domain/UBGraphicsDelegateFrame.cpp
+10
-5
UBGraphicsPixmapItem.cpp
src/domain/UBGraphicsPixmapItem.cpp
+2
-2
No files found.
src/domain/UBGraphicsDelegateFrame.cpp
View file @
bd2e393d
...
...
@@ -308,9 +308,12 @@ void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
if
((
qAbs
(
width
*
scaleX
))
<
2
*
mFrameWidth
){
bool
negative
=
(
scaleX
<
0
)
?
true
:
false
;
if
(
negative
){
if
(
mMirrorX
)
scaleX
=
2
*
mFrameWidth
/
width
;
else
scaleX
=
-
2
*
mFrameWidth
/
width
;
}
else
{
scaleX
=
2
*
mFrameWidth
/
width
;
scaleX
=
-
1
;
}
}
mScaleX
=
scaleX
;
...
...
@@ -333,11 +336,13 @@ void UBGraphicsDelegateFrame::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
if
(
mDelegate
->
isFlippable
()
&&
qAbs
(
scaleY
)
!=
0
){
if
((
qAbs
(
height
*
scaleY
))
<
2
*
mFrameWidth
){
bool
negative
=
(
scaleY
<
0
)
?
true
:
false
;
//mMirrorY = (negative?mMirrorY:!mMirrorY);
if
(
negative
){
if
(
mMirrorY
)
scaleY
=
2
*
mFrameWidth
/
width
;
else
scaleY
=
-
2
*
mFrameWidth
/
width
;
}
else
{
scaleY
=
2
*
mFrameWidth
/
width
;
scaleY
=
-
1
;
}
}
mScaleY
=
scaleY
;
...
...
src/domain/UBGraphicsPixmapItem.cpp
View file @
bd2e393d
...
...
@@ -29,10 +29,10 @@ UBGraphicsPixmapItem::UBGraphicsPixmapItem(QGraphicsItem* parent)
:
QGraphicsPixmapItem
(
parent
)
{
mDelegate
=
new
UBGraphicsItemDelegate
(
this
,
0
,
true
,
true
);
mDelegate
->
init
();
//
mDelegate->init();
// NOTE: Do not remove this code, I'm just doing a backup of my changes! thx..
//
mDelegate->setFlippable(true);
mDelegate
->
setFlippable
(
true
);
setData
(
UBGraphicsItemData
::
ItemLayerType
,
UBItemLayerType
::
Object
);
setTransformationMode
(
Qt
::
SmoothTransformation
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment