Bastien Bouclet
ce3d5ebec1
GRAPHICS: Fix buffer overflow in drawBevelSquareAlgClip
...
Port of the fix from 0d8afad55
.
2017-11-12 10:38:05 +01:00
Colin Snover
0d8afad559
GRAPHICS: Fix buffer overflow in drawBevelSquareAlg
...
Thanks to garethbp for discovering the issue and providing a fix.
Fixes Trac#6468.
2017-11-11 20:49:19 -06:00
Torbjörn Andersson
5602ca3d64
JANITORIAL: Silence some more GCC 7 fallthrough warnings
...
These weren't explicitly flagged as deliberate, but I recognize
Duff's Device when I see it.
2017-08-06 15:26:44 +02:00
Eugene Sandulenko
355c4fa646
JANITORIAL: Remove more trailing spaces
2016-10-09 15:02:02 +02:00
Eugene Sandulenko
6524a8d103
GUI: Added transparency to PicWidgets
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
94bc75ae46
GUI: Implemented centering of dialog background
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
75f9b099dc
GUI: Added possibility to specify scale mode for AlphaBitmaps
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
38114eb760
GUI: Plug NinePatch bitmaps into parser
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
ec7312ac13
GUI: Implemented more modes to autoscale
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
4474ccf814
GUI: Implemented alphabitmap autoscale
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
f0c52096f3
GUI: Implemented possibility to use alphabitmaps in GraphicsWidget
2016-08-24 16:07:55 +06:00
Eugene Sandulenko
53a42ececf
GUI: Added new alphabitmap image type
2016-08-24 16:07:55 +06:00
Torbjörn Andersson
11ec5ad5a3
GRAPHICS: Fix copy/paste error in blitAlphaBitmapClip() (CID 1357410)
2016-07-11 05:43:24 +02:00
Torbjörn Andersson
6eabc887e1
GRAPHICS: Fix copy/paste error in blitSurfaceClip (CID 1357411)
2016-07-11 05:41:04 +02:00
Alexander Tkachev
6de5324742
JANITORIAL: Fix a few warnings
2016-07-03 12:24:55 +02:00
Alexander Tkachev
cea58cc61c
JANITORIAL: Remove trailing spaces
2016-07-03 12:24:53 +02:00
Alexander Tkachev
6fd6043391
GUI: Fix blitAlphaBitmapClip()
2016-07-03 12:24:11 +02:00
Alexander Tkachev
916c86e689
GUI: Add blitAlphaBitmapClip()
2016-07-03 12:23:41 +02:00
Alexander Tkachev
e636894b06
GUI: Add fillSurfaceClip()
2016-07-03 12:23:12 +02:00
Alexander Tkachev
0dcd29e998
GUI: Fix drawRoundedSquareClip()
2016-07-03 12:22:26 +02:00
Alexander Tkachev
80412a4139
GUI: Add drawTabClip()
2016-07-03 12:22:10 +02:00
Alexander Tkachev
ee00156d54
GUI: Add drawBeveledSquareClip()
2016-07-03 12:21:55 +02:00
Alexander Tkachev
05383532b7
GUI: Add drawLineClip()
2016-07-03 12:21:40 +02:00
Alexander Tkachev
2231de040f
GUI: Add drawCircle()
2016-07-03 12:21:24 +02:00
Alexander Tkachev
f22d11953d
GUI: Add drawSquareClip()
2016-07-03 12:21:09 +02:00
Alexander Tkachev
559ca37daf
GUI: Add VectorRendererSpec::drawTriangleClip()
2016-07-03 12:20:37 +02:00
Alexander Tkachev
cccf6eed78
GUI: Add drawRoundedSquareShadowClip()
2016-07-03 12:18:18 +02:00
Alexander Tkachev
e04e13de33
GUI: Remove unnecessary debug output
2016-07-03 12:18:00 +02:00
Alexander Tkachev
425d963bd3
GUI: Fix ThemeItemTextData's dirty rectangle
2016-07-03 12:17:26 +02:00
Alexander Tkachev
8f2d35b0b8
GUI: drawRoundedSquareClip()
2016-07-03 12:16:26 +02:00
Alexander Tkachev
3d2730a0dd
GUI: clippingRect propagated deeper
2016-07-03 12:15:51 +02:00
Ori Avtalion
9b69b86f29
GRAPHICS: Prevent crash when drawing 0-height rounded corners
...
Opening/closing the console when scroll bars were visible caused
occasional crashes. Fixes #7089 .
2016-03-26 19:43:16 +03:00
Johannes Schickel
b6b2bcf607
GRAPHICS: Remove superfluous ABS usage to silence a warning.
2016-02-21 17:45:30 +01:00
Johannes Schickel
0a06942e4e
GRAPHICS: Skip empty rects and empty shadows in VectorRendererSpec::drawSquareShadow.
2016-02-21 14:41:29 +01:00
Johannes Schickel
edaff1bdea
GRAPHICS: Skip empty rects in VectorRenderer*'s drawInteriorRoundedSquareAlg.
2016-02-21 14:41:29 +01:00
Johannes Schickel
1c4f41feed
GRAPHICS: Skip empty rects in VectorRendererSpec::drawTriangleFast.
2016-02-21 14:41:29 +01:00
Johannes Schickel
df65bad9d2
GRAPHICS: Skip empty rects in VectorRendererSpec::drawSquareAlg.
2016-02-21 14:41:29 +01:00
Johannes Schickel
5f61de0e68
GRAPHICS: Skip empty rects in VectorRender*'s drawTabAlg.
2016-02-21 14:41:29 +01:00
Johannes Schickel
610d2eec00
GRAPHICS: Make VectorRendererAA::drawLineAlg never divide by zero.
...
It won't crash any longer in the case dx = dy = 0.
2016-02-21 14:41:29 +01:00
Johannes Schickel
5bc3a5aa3f
GRAPHICS: Let drawLineAlg in VectorRenderer code take unsigned dx, dy.
2016-02-21 14:41:29 +01:00
Johannes Schickel
0e7facad76
GRAPHICS: Skip empty rects in VectorRendererSpec::drawTriangleVertAlg.
2016-02-21 14:41:29 +01:00
Johannes Schickel
16aac72b60
GRAPHICS: Add comments about safe divisions in VectorRendererSpec.cpp.
2016-02-21 14:41:29 +01:00
Filippos Karapetis
614de0d761
GRAPHICS: Remove trailing whitespace
2014-10-28 15:38:50 +02:00
Johannes Schickel
63ccd85baa
GRAPHICS: colour -> color in VectorRendererSpec code.
2014-05-27 02:04:08 +02:00
Marcus Comstedt
4b81b1299d
GRAPHICS: Fix dest alpha formula in blendPixelPtr
...
The original alpha computation formula had a problem: If something was
drawn on top of a pixel that was already fully opaque, there would be
an overflow in the computed alpha, and the destination alpha would be
truncated to 0 (fully transparent).
In commit 264ba4a9
this formula was replaced with another one, which
did not have overflows but also was not correct.
This commits introduces a new formula, where the rounding errors have
been turned in another direction; drawing a fully opaque pixel on top
of a transparent one would result in a pixel which is almost, but not
fully, opaque. However, this is no problem in practice, since drawing
fully opaque pixels can be achieved with much less code as a special
case, so add that (also improves rendering speed).
2014-01-10 20:04:10 +01:00
Marcus Comstedt
51d7405a7b
GRAPHICS: Fix computation of addA in darkenFill()
...
The old computation had rounding issues, causing alpha to leak into
the red (usually) component. There's a much easier way to compute it
that does not lead to such problems: What should really happen is that
the two top bits of the A component should be set to 1 (thus adding
75% alpha). So compute it that way for speed and precision.
2014-01-10 15:56:53 +01:00
D G Turner
094c378217
GRAPHICS: Minor readability fixes to drawBevelSquareAlg method.
...
No functional change.
2013-12-13 23:41:24 +00:00
Eugene Sandulenko
8a340007ea
Merge pull request #361 from rundfunk47/guiimprovements
...
GUI: Various GUI Improvements
2013-08-22 05:31:23 -07:00
Johannes Schickel
a2fabef87c
GRAPHICS: Increase robustness of VectorRendererSpec::drawString.
2013-08-22 11:46:50 +02:00
Johannes Schickel
af13b74d02
GRAPHICS: Unify drawing paths in VectorRendererSpec::drawString.
...
Formerly, the behavior between when a drawable area was specified and when not
was different in a sense which is not expected. For example, when an empty
textDrawableArea was passed and the text could be drawn outside the 'area'
specified. While when a textDrawableArea covering the whole screen was passed
the text was clipped inside 'area'. Now, the code does follow the latter logic
in both cases.
I am not sure whether this will cause any issues, but a quick check of the
launcher and options menu didn't reveal anything...
2013-08-22 11:46:49 +02:00