Commit Graph
120 Commits
Author SHA1 Message Date
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 TkachevandEugene Sandulenko 6de5324742 JANITORIAL: Fix a few warnings 2016-07-03 12:24:55 +02:00
Alexander TkachevandEugene Sandulenko cea58cc61c JANITORIAL: Remove trailing spaces 2016-07-03 12:24:53 +02:00
Alexander TkachevandEugene Sandulenko 6fd6043391 GUI: Fix blitAlphaBitmapClip() 2016-07-03 12:24:11 +02:00
Alexander TkachevandEugene Sandulenko 916c86e689 GUI: Add blitAlphaBitmapClip() 2016-07-03 12:23:41 +02:00
Alexander TkachevandEugene Sandulenko e636894b06 GUI: Add fillSurfaceClip() 2016-07-03 12:23:12 +02:00
Alexander TkachevandEugene Sandulenko 0dcd29e998 GUI: Fix drawRoundedSquareClip() 2016-07-03 12:22:26 +02:00
Alexander TkachevandEugene Sandulenko 80412a4139 GUI: Add drawTabClip() 2016-07-03 12:22:10 +02:00
Alexander TkachevandEugene Sandulenko ee00156d54 GUI: Add drawBeveledSquareClip() 2016-07-03 12:21:55 +02:00
Alexander TkachevandEugene Sandulenko 05383532b7 GUI: Add drawLineClip() 2016-07-03 12:21:40 +02:00
Alexander TkachevandEugene Sandulenko 2231de040f GUI: Add drawCircle() 2016-07-03 12:21:24 +02:00
Alexander TkachevandEugene Sandulenko f22d11953d GUI: Add drawSquareClip() 2016-07-03 12:21:09 +02:00
Alexander TkachevandEugene Sandulenko 559ca37daf GUI: Add VectorRendererSpec::drawTriangleClip() 2016-07-03 12:20:37 +02:00
Alexander TkachevandEugene Sandulenko cccf6eed78 GUI: Add drawRoundedSquareShadowClip() 2016-07-03 12:18:18 +02:00
Alexander TkachevandEugene Sandulenko e04e13de33 GUI: Remove unnecessary debug output 2016-07-03 12:18:00 +02:00
Alexander TkachevandEugene Sandulenko 425d963bd3 GUI: Fix ThemeItemTextData's dirty rectangle 2016-07-03 12:17:26 +02:00
Alexander TkachevandEugene Sandulenko 8f2d35b0b8 GUI: drawRoundedSquareClip() 2016-07-03 12:16:26 +02:00
Alexander TkachevandEugene Sandulenko 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 SchickelandNarek Mailian a2fabef87c GRAPHICS: Increase robustness of VectorRendererSpec::drawString. 2013-08-22 11:46:50 +02:00
Johannes SchickelandNarek Mailian 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
Johannes SchickelandNarek Mailian 81ae06cae3 GRAPHICS: Simplify VectorRendererSpec::drawString.
This removes the two additional copy steps for rendering when a drawable text
area is specified. Instead it uses Surface::getSubArea to draw directly onto
_activeSurface.
2013-08-22 11:46:48 +02:00
Torbjörn Andersson 8c2bbb09a8 GRAPHICS: Add missing "break"s in switch, CID 1063214
This won't actually make any difference, since the fall through
would do nothing and then reach the break in the default case. But
I think it's less error-prone this way if the code is ever modified.
2013-08-19 19:34:41 +02:00
Narek Mailian 6fa3c7751f GRAPHICS: Gradient blending on borders of rounded squares 2013-08-16 20:54:10 +02:00
Narek Mailian 52ee92625f GRAPHICS: Change soft-shadow calculation to not use doubles 2013-08-16 20:54:09 +02:00
Narek Mailian b91e10f931 GRAPHICS: Shadows on tabs 2013-08-16 20:54:09 +02:00
Narek Mailian 5c00dbbd2a GRAPHICS: Add support for Soft Shadows with rounded squares 2013-08-16 20:54:08 +02:00
Narek Mailian 887a99e211 GRAPHICS: Added changes and improved code from inisider/scummvm (partial text)
Includes code from https://github.com/inisider/scummvm/ , which has been
squashed and bugfixed
2013-08-16 20:54:08 +02:00
Johannes Schickel a2a5d42a58 GRAPHICS: Fix warnings about mismatching format arguments. 2013-08-12 16:43:35 +02:00
Narek Mailian 1f1d35bd3d GRAPHICS: Allow VectorRenderer and ThemeEngine to init with 4BPP 2013-08-08 08:35:08 +02:00
Narek Mailian f545a2f08f GUI: Change name of GUI-renderers to remove "16-bit" 2013-08-08 08:35:08 +02:00
Narek Mailian 1d40dca7a0 GRAPHICS: Add error-checking in blendPixelPtr for invalid BPPs 2013-08-08 08:27:11 +02:00
Johannes SchickelandNarek Mailian 0f59009e6e GRAPHICS: Fix VectorRendererSpec for RGBA8888.
Formerly values in the gradient and blending code overflowed and thus caused
incorrect colors. Now there's some special case for 32bpp modes, which needs
slightly more operations but assures a correct output.
2013-08-08 08:27:11 +02:00