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
d64c87a9
Commit
d64c87a9
authored
Sep 06, 2012
by
Yimgo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Filled aristo tool brush.
parent
3d8301cc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
UBBoardView.cpp
src/board/UBBoardView.cpp
+1
-0
UBGraphicsAristo.cpp
src/tools/UBGraphicsAristo.cpp
+12
-1
UBGraphicsAristo.h
src/tools/UBGraphicsAristo.h
+1
-1
No files found.
src/board/UBBoardView.cpp
View file @
d64c87a9
...
...
@@ -59,6 +59,7 @@
#include "tools/UBGraphicsCache.h"
#include "tools/UBGraphicsTriangle.h"
#include "tools/UBGraphicsProtractor.h"
#include "tools/UBGraphicsAristo.h"
#include "core/memcheck.h"
...
...
src/tools/UBGraphicsAristo.cpp
View file @
d64c87a9
...
...
@@ -132,7 +132,7 @@ void UBGraphicsAristo::paint(QPainter *painter, const QStyleOptionGraphicsItem *
{
QPolygonF
polygon
;
painter
->
setBrush
(
Qt
::
NoBrush
);
painter
->
setBrush
(
fillBrush
()
);
painter
->
setPen
(
drawColor
());
polygon
<<
A
<<
B
<<
C
;
...
...
@@ -390,6 +390,17 @@ void UBGraphicsAristo::paintProtractorGraduations(QPainter* painter)
painter
->
restore
();
}
QBrush
UBGraphicsAristo
::
fillBrush
()
const
{
QColor
fillColor
=
edgeFillColor
();
// scene()->isDarkBackground() ? sDarkBackgroundFillColor : sFillColor;
QColor
fillColorCenter
=
middleFillColor
();
//scene()->isDarkBackground() ? sDarkBackgroundFillColorCenter : sFillColorCenter;
QColor
transparentWhite
=
Qt
::
white
;
transparentWhite
.
setAlpha
(
scene
()
->
isDarkBackground
()
?
sDrawTransparency
:
sFillTransparency
);
QRadialGradient
radialGradient
(
rect
().
center
(),
radius
(),
rect
().
center
());
radialGradient
.
setColorAt
(
0
,
fillColorCenter
);
radialGradient
.
setColorAt
(
1
,
fillColor
);
return
radialGradient
;
}
void
UBGraphicsAristo
::
rotateAroundCenter
(
qreal
angle
)
{
...
...
src/tools/UBGraphicsAristo.h
View file @
d64c87a9
...
...
@@ -147,7 +147,7 @@ class UBGraphicsAristo : public UBAbstractDrawRuler, public QGraphicsPolygonItem
{
return
sqrt
(((
B
.
x
()
-
A
.
x
())
*
(
B
.
x
()
-
A
.
x
()))
+
((
B
.
y
()
-
A
.
y
())
*
(
B
.
y
()
-
A
.
y
())))
*
9
/
16
-
20
;
}
QBrush
fillBrush
()
const
;
UBGraphicsAristoOrientation
mOrientation
;
...
...
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