189 Commits

Author SHA1 Message Date
Cameron Cawley 583ebb1147 GRAPHICS: Always use simpleBlitFrom in VectorRendererSpec 2026-04-14 18:46:14 +03:00
Donovan Watteau 7f19a83f13 COMMON: Replace STATIC_ASSERT uses with static_assert
The current C++11 requirement means that all targets already support
static_assert().
2025-10-12 14:11:24 +03:00
Cameron Cawley 96f9569790 GUI: Make use of simple blitting routines where possible 2024-06-19 02:36:17 +02:00
Cameron Cawley 953772ba99 COMMON: Rename memset2/4/8 to memset16/32/64 2023-11-06 13:40:38 +02:00
Cameron Cawley cbad8faac1 GRAPHICS: Use memset2 and memset4 in VectorRendererSpec 2023-11-06 13:40:38 +02:00
Eugene Sandulenko 72f57a670e GRAPHICS: Removed temporary debug output 2023-09-17 00:56:28 +02:00
Eugene Sandulenko 5653eccba4 GUI: Propagate tab vertical flip to the VectorRenderer 2023-09-17 00:56:28 +02:00
Le Philousophe f06f470685 GRAPHICS: Properly take stroke width into account when drawing lines
Old code:
- didn't handle well strokes with an odd width
- didn't handle strokes widths above 1 in generic lines handler
2023-06-03 18:27:17 +02:00
su-xingyu 6ff2212f51 GUI: Fix hard shadow of tabs under HiDPI
Introduce 'shaodwIntensity' to shadow drawing functions
2023-04-15 22:17:27 +02:00
su-xingyu c577b1d616 GUI: Fix hard shadow under HiDPI rendering (#4908) 2023-04-15 02:04:16 +02:00
Cameron Cawley fb2503d02e GUI: Only use a transparent colour for BMP images 2023-04-09 12:54:38 +02:00
Le Philousophe a2d8d9e4ce GRAPHICS: Fix clipping for circle and rounded squares
Rect::contains expect that bottom right is excluded but circle functions
consider the radius as included.

In addition fix an error in Wu's algorithm for rounded squares.
2023-03-19 17:33:01 +01:00
Vladimir Serbinenko 0557535324 GRAPHICS: Support RGB332 in VectorRendererSpec.
This is efficient on RS90
2023-01-12 10:27:20 +03:00
Cameron Cawley 33675c0b2e GRAPHICS: Fix darkened fills on overlays with alpha bits but no blending 2023-01-11 12:55:52 +00:00
Donovan Watteau 27f9a460b5 JANITORIAL: Fix "the the" and similar typos 2022-07-29 19:36:40 +03:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Eugene Sandulenko 9a6d04fa01 Revert "GRAPHICS: fix off-by-one errors when drawing a rounded rectangle"
This reverts commit 2d8e0579ea.

This leads to artifacts in GUI
2021-11-21 20:23:37 +01:00
Benoit Pierre 2d8e0579ea GRAPHICS: fix off-by-one errors when drawing a rounded rectangle
The code would create a rectangle of width+1 by weight+1, resulting
in buffer overflows when drawing at the bottom limit of a surface.
2021-11-21 20:22:06 +01:00
av-dx 4573f049f2 Revert "GUI: Add horizontal triangle drawing algorithm"
This reverts commit 6d2732e598500df36c793896a9a7bc3876fbb4e6.
2021-11-12 14:46:34 +01:00
av-dx 962d481e1b GUI: Add horizontal triangle drawing algorithm 2021-11-12 14:46:34 +01:00
av-dx e8bee56f9a JANITORIAL: Formatting fixes 2021-11-12 14:46:34 +01:00
av-dx fadb918bbd GUI: Fix clipping on bitmap images 2021-11-12 14:46:34 +01:00
Orgad Shaneh cd1200bf7b GRAPHICS: Fix indentation in VectorRendererSpec
Reported by GCC11.
2021-10-21 11:54:19 +02:00
Le Philousophe 585b112d6b GRAPHICS: Implement horizontal triangles
Simplify drawTriangle in the same time and fix a bad copy paste when
drawing outline with w == h
2021-07-27 20:38:45 +02:00
Le Philousophe 087eb6005c GRAPHICS: Fix triangle rendering with some aspect ratios
The test to detect we cross an integer doesn't take into account 0.5
steps
When w = 9 and h = 7, you get dx = 4, dx = 5 and gradient = 0.5
In this case you never get interx + gradient > ipart(interx) + 1 when
interx is an integer.
2021-06-20 12:30:20 +02:00
Le Philousophe 66c78dc25a GRAPHICS: Ensure we still have space to draw the shadow
Else we get ptr_tl and ptr_tr reversed which causes bugs when filling
pixels
2021-06-20 11:48:19 +02:00
Eugene Sandulenko c27ad28ab2 GRAPHICS: GUI: Take tab shadow size from theme 2021-04-13 08:09:16 +02:00
Eugene Sandulenko 382d4a6cd7 GRAPHICS: GUI: Do not use transparency when restoring background 2021-04-11 23:47:24 +02:00
Eugene Sandulenko d3f5d34b62 GRAPHICS: Unify VectorRenderer blitting routines 2021-04-11 21:21:44 +02:00
Eugene Sandulenko dbf192fd13 GRAPHICS: Simplify VectorRenderer blitting routines 2021-04-11 21:21:44 +02:00
Eugene Sandulenko 2839715a45 GUI: Remove TransparentSurface remnants aka alphabitmaps from themes 2021-04-11 21:21:44 +02:00
Eugene Sandulenko bd083c7fa7 GUI: Switch GUI to ManagedSurface 2021-04-11 21:21:44 +02:00
Eugene Sandulenko 09f11bd37e GRAPHICS: Fix transparency in ManagedSurface bitmaps 2021-04-11 21:21:44 +02:00
Eugene Sandulenko 916859ab86 GRAPHICS: Added (hacky) blitManagedSurface
So far, it is hardcoded, but in reality we need to merge
ManagedSurface and TransparentSurface and add blit() methods
to TransparentSurface
2021-04-11 21:21:44 +02:00
Eugene Sandulenko f78155b12f GRAPHICS: Fix rounded square rendering 2021-04-11 21:21:44 +02:00
Eugene Sandulenko 7a09662701 GRAPHICS: Fix artifacts in rounded square border drawing in GUI 2021-04-11 21:21:44 +02:00
Thierry Crozat 2d64cba73a GRAPHICS: Remove unused function
This was a left over from GUI conversion to U32String.
2020-11-04 22:25:43 +00:00
aryanrawlani28 521acaf459 GUI: RTL: Fix 1-off issue for drawing u32 strings
When RTL mode is on, previously it was fixed in a commit. This commit just reapplies that, for u32 string drawing.
2020-08-30 14:43:41 +02:00
aryanrawlani28 ad78777bc6 GUI: Handle ellipsis shortening of text when drawing u32 strings 2020-08-30 14:43:41 +02:00
aryanrawlani28 20e21ba79d GUI: U32: Temporarily overload drawString
- To accept u32 string as a parameter
- To draw everything else normally until fully converted to drawing u32
2020-08-30 14:43:41 +02:00
aryanrawlani28 5a093e4e95 GUI: RTL: Improve right align text drawing
- Fix last chars being eaten
- Add support for input in right-align mode editables
- Fix issue with dirtyness of editables after clicking
- Improve spacing for lists and popup
- Make numbers reversed in lists
2020-06-22 00:03:02 +02:00
Cameron Cawley 00e3c03755 ALL: Remove unnecessary graphics/colormasks.h includes 2020-06-15 16:59:34 +01:00
Eugene Sandulenko c403182353 GRAPHICS: Initialize class variables in VectorRenderer 2020-04-27 13:57:35 +02:00
Bastien Bouclet 2c812a6b7a GUI: Add DropdownButtonWidget and use it in the launcher for mass add
DropdownButtonWidget is a button split in two parts vertically. Clicking
the left part triggers a default action. Clicking the right part shows a
list of other actions the user can choose from.

Using this widget on the launcher lets 'Mass add' be a secondary action
of the 'Add' button, removing the necessity of pressing the shift key to
access the feature.
2019-11-24 14:06:25 +01:00
D G Turner be56e9afed GRAPHICS: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-11-17 10:11:25 +00:00
Bastien Bouclet 191059b060 GRAPHICS: Fix drawing rounded rectangle borders for the non AA renderer
The check for the clipping rect was in the non-clip version of the method,
and was using values not in screen-space.
2019-10-08 20:54:50 +02:00
Bastien Bouclet eabb81829f GRAPHICS: Fix modern theme tab widgets being 2px too tall
This was noticeable in the graphics tab of the options dialog when
scrolling down. The widgets would be partially drawn on top of the
tabs.
2019-10-07 22:18:27 +02:00
Bastien Bouclet 1d764bd787 GRAPHICS: Vector renderer clipping rect related cleanups
Selecting whether a clipping variant of a draw call needs to be used is
no longer the responsibility to the caller. The clipping rect is now
part of the state of the renderer.

Also fix some of the draw calls to better apply the clipping rect.
2019-10-07 21:47:42 +02:00
Bastien Bouclet 042e196488 GRAPHICS: Fix VectorRenderer's colorFillClip to apply the clipping rect 2019-09-08 19:55:23 +02:00
Lothar Serra Mari fe83c985be GUI: Allow GUI background colors other than black in Classic Theme (#1526)
GUI: Allow GUI background colors other than black in Classic Theme
2019-03-10 16:56:17 +02:00