Commit Graph
90 Commits
Author SHA1 Message Date
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
Johannes Schickel 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 Schickel 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
Johannes Schickel 5111746911 GRAPHICS: Take advantage of Surface::getPixels. 2013-08-03 04:02:49 +02:00
Johannes Schickel 89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Johannes Schickel aec9b9e22a ALL: Let overlay related methods in OSystem take a void * and use a proper pitch values.
This is a first step to get rid of OverlayColor, which is a requirement for
proper 4Bpp overlay support.
2012-06-16 04:17:14 +02:00
Willem Jan Palenstijn d0c655f1fa GUI: Fix mingw-w64 build errors 2012-02-20 22:38:35 +01:00
Willem Jan Palenstijn 66d3def0e5 GUI: Implement AAed tabs
The stroke effect isn't properly implemented yet since it isn't used
in the modern theme.

There are slight bleeding colours around the corners of the
tab_background when its corners overlap with the corners of the
underlying dialog. These are hard to avoid because the underlying dialog
destroys the background that we should be blending these corners with.
2012-02-20 22:17:33 +01:00
Willem Jan Palenstijn 19cb2dc7e7 GUI: Add AA dialog corners on alpha overlays 2012-02-20 22:17:33 +01:00
Willem Jan Palenstijn c6ac4cc7ea GUI: Minor cleanup 2012-02-20 22:17:33 +01:00
Willem Jan Palenstijn 905f9591ab GUI: Speed up alpha blending with black for classic dialog backgrounds 2012-02-20 22:17:33 +01:00
Willem Jan Palenstijn 264ba4a9ec GUI: Keep dst alpha unchanged when blending colours 2012-02-20 22:17:33 +01:00
Willem Jan Palenstijn 2957321903 GUI: Rewrite AA rounded square renderer
This fixes bleeding of colours between different regions.
It also turns 'bevel' into an option that turns the stroke into a bevel,
and implements antialiased gradient-fills.
2012-02-20 22:17:28 +01:00
D G Turner 6a2522a142 GRAPHICS: Crash fix for bug #3466536 ("Assertion on MIDI gain slider").
This fixes the crash, but the Midi Gain slider (and probably any other
slider bar in modern theme) still distorts the left corner shape when
the slider thumb is at very small values...
2011-12-29 06:32:09 +00:00
Eugene Sandulenko 71d6771be5 GUI: Implement dithering for tabs and round squares 2011-12-14 00:56:15 +00:00
Alyssa Milburn 50c9aa1bc1 GRAPHICS: Fix compiler warnings. 2011-12-10 14:16:35 +01:00
Eugene Sandulenko 9d3eb2ebd7 GUI: Refactor gradient calculation into separate method 2011-12-10 11:51:10 +00:00
Eugene Sandulenko 1dbc41d411 GUI: Move _gradientBytes to VectorRendererSpec 2011-12-10 11:51:10 +00:00
Eugene Sandulenko 04d1c1d54b GUI: Implemented color dithering for background 2011-12-10 11:51:10 +00:00
MaximRussia ad4471f70c GUI: Improved pop up and scrollbar arrows look
Previous triangle drawing was all wrong, rewrote it from the scratch.
Added padding to drawsteps in stx files
2011-12-07 14:04:10 +00:00
Johannes Schickel 61795739f8 COMMON: Rename Common::set_to to Common::fill.
This makes the name match with the name of the STL function with the same
behavior.
2011-11-16 18:06:30 +01:00
Willem Jan Palenstijn 052177d136 COMMON: Remove some double-underscore defines (reserved) 2011-11-14 14:59:58 +01:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Johannes Schickel 71bdb86e02 Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16

Conflicts:
	graphics/png.cpp
2011-05-01 16:54:45 +02:00
Ori Avtalion 9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Johannes Schickel 3fd919060c GRPAHICS: Do not access Surface::bytesPerPixel anymore. 2011-04-17 20:58:08 +02:00
Torbjörn Andersson 54b2a8c98d JANITORIAL: Cleanup (mostly whitespace)
svn-id: r53161
2010-10-12 04:19:58 +00:00
Eugene Sandulenko d2cf99f67d GUI: Fixed bug #2505686: "GUI: minor artifacts in rounded corners"
It is practically not possible to get rid of those completely
due to rounding errors with 16-bit surface.

svn-id: r52367
2010-08-25 07:39:08 +00:00
Johannes Schickel 3f2057226f Commit salty-horse's patch for VectorRendererSpec.cpp, which fixes the use of invalid C++.
svn-id: r48291
2010-03-18 21:45:27 +00:00
Max Horn 8ba75fc522 Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
svn-id: r44495
2009-09-30 16:16:53 +00:00
Johannes Schickel f41b496255 Fixed missing clearing of the low bit of the alpha mask in the "dim" screen shading function.
svn-id: r42935
2009-07-30 16:51:53 +00:00
Johannes Schickel 8c323b6bb8 Fix bug #2829737: "GUI: Wrong background colours on dialog screens (IRIX)".
svn-id: r42934
2009-07-30 16:43:25 +00:00
Vicent Marti af289bdb03 Fixed bug 2820514 ("Help dialog causes crash")
svn-id: r42537
2009-07-16 17:29:31 +00:00