Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
c3ae86ea
Commit
c3ae86ea
authored
Jun 07, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: Fix gradient on filled arcs.
parent
7b385741
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
14 deletions
+11
-14
xtt/lib/glow/qt/glow_draw_qt.cqt
xtt/lib/glow/qt/glow_draw_qt.cqt
+11
-14
No files found.
xtt/lib/glow/qt/glow_draw_qt.cqt
View file @
c3ae86ea
...
...
@@ -1908,28 +1908,25 @@ void GlowDrawQt::gradient_fill_rectrounded(int x, int y, int width, int h,
}
}
void GlowDrawQt::gradient_fill_arc(int x, int y, int width, int h
, int angle1
,
int angle
2, glow_eDrawType d0, glow_eDrawType d1, glow_eDrawType d2
,
glow_eGradient gradient)
void GlowDrawQt::gradient_fill_arc(int x, int y, int width, int h
eight
,
int angle
1, int angle2, glow_eDrawType d0, glow_eDrawType d1
,
glow_e
DrawType d2, glow_e
Gradient gradient)
{
while (angle1 >= 360) {
angle1 -= 360;
}
while (angle1 < 360) {
angle1 += 360;
if (angle1 >= 360) {
angle1 = angle1 - angle1 / 360 * 360;
} else if (angle1 < 0) {
angle1 = angle1 + (-angle1 / 360 + 1) * 360;
}
QGradient* pat;
if ((pat = gradient_create_pattern(
-1, -1, 2, 2
, d0, d1, d2, gradient))) {
if ((pat = gradient_create_pattern(
x, y, width, height
, d0, d1, d2, gradient))) {
get_painter(glow_eDrawType_Line, 0);
painter.translate(x + width / 2.0, y + h / 2.0);
painter.scale(width / 2.0, h / 2.0);
QPainterPath path;
if (!(angle2 == 360 || angle2 == 180))
path.moveTo(
0,
0);
path.arcTo(
-1, -1, 2, 2
, angle1, angle2);
path.moveTo(
x + width / 2.0, y + height / 2.
0);
path.arcTo(
x, y, width, height
, angle1, angle2);
if (!(angle2 == 360 || angle2 == 180))
path.moveTo(
0,
0);
path.moveTo(
x + width / 2.0, y + height / 2.
0);
painter.fillPath(path, *pat);
reset_clip();
...
...
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