Nico Weber
63dcd59fa5
LibGfx: Make Color formattable
2020-10-26 18:55:36 +01:00
Luke
c0d9daadb0
LibGfx: Fix cut off CSS color names
2020-09-29 09:20:33 +02:00
Andreas Kling
3bba163574
LibGfx: Add Color::Transparent as a named color
2020-06-13 20:03:19 +02:00
Andreas Kling
fdfda6dec2
AK: Make string-to-number conversion helpers return Optional
...
Get rid of the weird old signature:
- int StringType::to_int(bool& ok) const
And replace it with sensible new signature:
- Optional<int> StringType::to_int() const
2020-06-12 21:28:55 +02:00
Sergey Bugaev
fc481552f5
LibIPC+LibGfx+IPCCompiler: Drop some unused includes
2020-06-08 13:58:32 +02:00
Sergey Bugaev
f49e83c565
LibGfx: Fix debug-printing colors
...
The operator has to live in the namespace Gfx.
2020-06-02 21:49:47 +02:00
Andreas Kling
d0eb35e5c3
LibGfx: Use a bit of constexpr in Color
...
This avoids a bunch of strlen()'s when we're parsing web colors.
2020-05-30 17:47:50 +02:00
Andreas Kling
fbda28248a
LibGfx+IPCCompiler: Add IPC encoders for Color and ShareableBitmap
2020-05-12 19:04:03 +02:00
Linus Groh
9dbab2d05e
Misc: Replace "String(string_view)" with "string_view.to_string()"
...
StringView::to_string() was added in 917ccb1 but not actually used
anywhere yet.
2020-05-06 19:28:59 +02:00
Andreas Kling
b7339745d0
LibGfx: Add a naive "rgba(r,g,b,a)" color parser
...
It's not very whitespace tolerant but it works.
2020-05-05 15:50:28 +02:00
Andreas Kling
17e76b4760
LibGfx: Add Color::to_string_without_alpha()
...
This simply returns an "#rrggbb" string and ignores the alpha value.
2020-04-29 15:31:45 +02:00
Andreas Kling
24a0354ce8
LibIPC+LibGfx: Pass the IPC::Decoder to decoding helpers
...
Instead of passing the BufferStream, pass the Decoder. I'd like to stop
using BufferStream eventually anyway, so it's good to get it out of any
API's where it's in currently.
2020-03-29 19:37:23 +02:00
Andreas Kling
fd5a3b3c39
LibGfx: Parse "rgb(r,g,b)" style color strings
...
This parser is not very lenient, but it does the basic job. :^)
2020-03-21 19:06:38 +01:00
Emanuel Sprung
074d935c6e
AK, LibGfx, LibGUI: Initialize various variables to zero.
...
The not initialized variables can lead to compiler warnings that
become errors with the -Werror flag.
2020-02-25 10:18:46 +01:00
Andreas Kling
a4d857e3c5
LibIPC+IPCCompiler: Add IPC::Decoder, let classes decode themselves
...
This shaves ~5 seconds off of a full build, not too bad. Also it just
seems nicer to push this logic out to classes. It could be better but
it's a start. :^)
2020-02-15 12:11:19 +01:00
Andreas Kling
08cae2773d
LibGfx: More work on header dependency reduction
2020-02-14 23:33:21 +01:00
Andreas Kling
9ac94d393e
LibGfx: Rename from LibDraw :^)
2020-02-06 12:04:00 +01:00