summaryrefslogtreecommitdiff
path: root/Libraries/LibGfx
AgeCommit message (Collapse)Author
2020-08-30LibGfx: add support for interlaced GIFsPeter Nelson
2020-08-30LibGfx: correctly handle GIF frame disposal modesPeter Nelson
RestoreBackground disposal mode is now a transparent fill to allow background to show through. RestorePrevious disposal mode now restores the previous frame.
2020-08-30Libraries: Unbreak building with extra debug macrosBen Wiederhake
2020-08-27Base: Create /res/icons/serenity for misc. sized system iconsthankyouverycool
2020-08-27Meta: Force semi-colon after MAKE_AK_NONXXXABLE()Ben Wiederhake
Before, we had about these occurrence counts: COPY: 13 without, 33 with MOVE: 12 without, 28 with Clearly, 'with' was the preferred way. However, this introduced double-semicolons all over the place, and caused some warnings to trigger. This patch *forces* the usage of a semi-colon when calling the macro, by removing the semi-colon within the macro. (And thus also gets rid of the double-semicolon.)
2020-08-26WindowServer+LibGfx: Move title bar button layout to WindowThemethankyouverycool
2020-08-26LibGfx: Use valid hsv values in painter debugLepkoQQ
2020-08-26LibGfx: Always use 0..360 0..1 0..1 in HSV colorsLepkoQQ
2020-08-25AK: Add Endian.h header to replace NetworkOrdered.h.asynts
2020-08-23LibGUI+LibGfx: Implement upside-down appearance for bottom-side tabsAndreas Kling
GUI::TabWidget has long has a TabPosition::Bottom option, but we still rendered the tab buttons the same as TabPosition::Top. This patch implements a custom look for bottom-side tabs. I've done my best to match the look of the top-side ones, but there might be some improvements we can make here. :^)
2020-08-23LibGfx+WindowServer: Simplify notification window frame themingAndreas Kling
Don't require theme clients to provide the frame rect, the theme can compute that internally based on the window rect.
2020-08-23LibGfx: Add TextAlignment::BottomRightPeter Elliott
2020-08-21LibGfx: Use an enumerator macro for color rolesAndreas Kling
2020-08-21LibGfx+WindowServer: Simplify WindowTheme::paint_normal_frame() APIAndreas Kling
Don't require passing in the outer frame rect since the theme can compute that itself, based on the window rect.
2020-08-20LibGfx: Support loading GIF local color maps if present :^)Andreas Kling
2020-08-20LibGfx: Initialize some uninitialized things in GIFLoaderAndreas Kling
2020-08-19LibGfx: Small improvement for DisjointRectSet::shatterTom
This avoids a call to clone() which would be discarded immediately. Also, avoid essentially cloning for each hammer rectangle unless there is actually a need for it.
2020-08-18LibGfx: Add convenience helpers for RectTom
2020-08-18LibGfx: Add convenience method Point::constrainedTom
2020-08-18LibGfx: Add a few convenience methods to DisjointRectSetTom
2020-08-17LibGfx: Move original StylePainter code to ClassicStylePainterSarah
StylePainter should continue to work the same as before.
2020-08-17LibGfx: Add abstract StylePainter classSarah
StylePainter's behavior is now handled by a static instance of BaseStylePainter. The original static behavior of StylePainter is left as-is for API compatibility.
2020-08-16LibGfx: Add initial font family matchingthankyouverycool
Fonts following the TypefaceWeightSize naming scheme now associate with bold weights of the same name and glyph size on construction.
2020-08-16AK: Rename KB, MB, GB to KiB, MiB, GiBNico Weber
The SI prefixes "k", "M", "G" mean "10^3", "10^6", "10^9". The IEC prefixes "Ki", "Mi", "Gi" mean "2^10", "2^20", "2^30". Let's use the correct name, at least in code. Only changes the name of the constants, no other behavior change.
2020-08-13LibGfx: use disposal method of previous frame in GIF transparencyPeter Nelson
The disposal method on a GIF animation frame now correctly applies to rendering of the next frame.
2020-08-13LibGfx: correctly handle transparency between GIF framesPeter Nelson
This fixes an issue where transparent pixels in GIF animation frames have their alpha values incorrectly set to zero, allowing the background behind the GIF to show through, instead of the previous animation frame. Additionally, transparent pixels are now correctly identified based on their index matching the image transparency index, instead of their color values.
2020-08-12LibGfx: Mark compilation-unit-only functions as staticBen Wiederhake
This enables a nice warning in case a function becomes dead code.
2020-08-12Meta: Replace remaining LibM/math.h includes with math.hLinus Groh
2020-08-10LibGfx: Correct copyright years for {Classic,}WindowTheme.{cpp,h}Andreas Kling
2020-08-10WindowServer+LibGfx: Move window frame rect calculation to WindowThemeAndreas Kling
2020-08-10ClassicWindowTheme: Fix titlebar redraw issuesSarah
This fixes titlebar rects being overly large and leaving smeary undrawn areas when using a theme with a titlebar height different to 19px.
2020-08-09WindowServer+LibGfx: Move notification window frame painting to LibGfxAndreas Kling
ClassicWindowTheme can now also paint notification window frames.
2020-08-09WindowServer+LibGfx: Move normal window frame painting to a WindowThemeAndreas Kling
This patch introduces the ClassicWindowTheme, which is our default theme implemented as a Gfx::WindowTheme subclass. In this initial cut, we move normal window frame painting and title bar metrics helpers out of WindowServer and into LibGfx. This will eventually allow us much greater flexibility with theming windows, and also makes it easier to build applications that want to render a window with a specific style for some reason. :^)
2020-08-09LibGfx: Add a basic abstract WindowTheme classAndreas Kling
This class will provide painting and metrics for window themes. :^)
2020-08-07LibGfx: Add dummy Font::x_height() getterAndreas Kling
Right now we just guess that the x-height is glyph_height/2, which is obviously not accurate. We currently don't store the x-height in fonts, so that's something we'll need to fix.
2020-08-06Refactor: Expose const_cast by removing ByteBuffer::warp(const void*, size_t)asynts
This function did a const_cast internally which made the call side look "safe". This method is removed completely and call sites are replaced with ByteBuffer::wrap(const_cast<void*>(data), size) which makes the behaviour obvious.
2020-08-05Unicode: Try s/codepoint/code_point/g againNico Weber
This time, without trailing 's'. Ran: git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
2020-08-05Revert "Unicode: s/codepoint/code_point/g"Nico Weber
This reverts commit ea9ac3155d1774f13ac4e9a96605c0e85a8f299e. It replaced "codepoint" with "code_points", not "code_point".
2020-08-05LibGfx: Make draw_scaled_bitmap() apply relative opacityAndreas Kling
Instead of overriding the alpha value of all source pixels, apply the override opacity by multiplying with the source alpha. Fixes #3004.
2020-08-04Revert "LibM: Always include <math.h> instead of <LibM/math.h>"Andreas Kling
This reverts commit dc12cbca41b8b667ae7ced1066647d47186d1557. Sadly this broke the build due to some confusion about <new>. Reverting until this can be solved fully.
2020-08-04LibM: Always include <math.h> instead of <LibM/math.h>Andreas Kling
This makes Lagom pick up the host math.h, which is what we want.
2020-08-03Unicode: s/codepoint/code_point/gAndreas Kling
Unicode calls them "code points" so let's follow their style.
2020-08-01Themes: Fix default theme window stripes and shadow after #2811Nico Weber
Change #2811 made window title stripes and window title shadow themable, but it used the same stripe and shadow color for all window modes. This is fine for the new 'basalt' theme which uses the same color in all four window modes, but it changed the default theme so that background windows had brown stripes and a brown shadow. Instead, make the title stripe and title shadow themable per window mode, and change the default theme to restore the colors it had before change #2811: The title stripe color is the same as Border1 for all window modes, and the title shadow is the same as the title stripe darkened by 0.6.
2020-08-01LibGfx: Add Paths to themesthankyouverycool
Paths allows themes to specify directories/files where custom resources are located.
2020-07-27LibGfx: Fix dumb typo in PNG decoderAndreas Kling
'=' is not the same as '*', indeed.
2020-07-27LibGfx: Simplify some excessive use of pow() in scanline unfilteringAndreas Kling
2020-07-27LibGfx: Templatize Point, Size, and RectMatthew Olsson
2020-07-26LibWeb: Abstract common operations of graphical SVG elementsMatthew Olsson
2020-07-26LibGfx: Add FloatPoint methodsMatthew Olsson
Adds some conversion constructors, as well as the missing arithmetic operations.
2020-07-26LibGfx: Add elliptical curves to PathMatthew Olsson