Age | Commit message (Collapse) | Author |
|
Ports/.port_include.sh, Toolchain/BuildIt.sh, Toolchain/UseIt.sh
have been left largely untouched due to use of Bash-exclusive
functions and variables such as $BASH_SOURCE, pushd and popd.
|
|
These are floating point varians of Point, Size and Rect.
|
|
ImageLoader was not the right name for this, as there is no loading
happening, only decoding. :^)
|
|
Get rid of the dedicated Emoji class to make it easier to store a null
value signifying a failed lookup.
This allows us to remember failed lookups, making subsequent failures
for the same codepoint much faster. :^)
|
|
Instead of trying again when asked repeatedly, just remember if it
didn't work out the first time.
|
|
Also change the API to take a destination rect instead of a source rect
since internally it was basically creating a destination rect from the
source rect anyway. It was a little confusing.
|
|
|
|
An ImageLoader is a generic interface for loading encoded image data of
any supported format. It has an ImageLoaderPlugin internally that does
all the work.
This patch adds an initial PNGImageLoaderPlugin that knows how to
retrieve the size of a PNG, and the bitmap. The API is divided into
size() and bitmap() to facilitate geometry-only decoding.
This will be useful in places like LibHTML where we need dimensions for
layout purposes but can wait with the bitmap until later.
|
|
This patch adds the 17 color names from CSS2.1, as well as support for
the "#rgb" shorthand where each component is a hex digit that gets
multiplied by 17.
|
|
We had two ways to get the data inside a ByteBuffer. That was silly.
|
|
Patch from Anonymous.
|
|
- Implemented support for more PNG formats including 16-bit per channel
and 8-bit indexed with palette.
- Made the library a little more resistant to crashes by returning
false for known but unsupported formats.
|
|
|
|
Sometimes you want to move the Rect by its right or bottom edge without
resizing the rect in the process. There are probably better names for
this but nothing comes to mind at the moment.
|
|
|
|
This will be very useful for optimizing games like DOOM. :^)
|
|
|
|
Also tidy up the alignment code to use switch statements.
|
|
This was a workaround to be able to build on case-insensitive file
systems where it might get confused about <string.h> vs <String.h>.
Let's just not support building that way, so String.h can have an
objectively nicer name. :^)
|
|
From here on, all strings displayed to the user are expected to
be encoded as UTF-8. The next few commits will deal with a few
existing places where this requirement is currently violated.
https://github.com/SerenityOS/serenity/issues/490
|
|
https://github.com/SerenityOS/serenity/issues/490
|
|
This class can locate and load emojis, which are expected to be stored
as regular PNG images at /res/emoji/U+XXXX.png, where XXXX is the
character codepoint.
https://github.com/SerenityOS/serenity/issues/490
|
|
|
|
|
|
We shouldn't assume that the pitch of some arbitrary bitmap memory that
we're wrapping is going to be 16-byte aligned. Instead, just take the
pitch as a parameter.
Also update WindowServer to pass the pitch to the framebuffer bitmaps.
|
|
We need to be able to paint progress bars without having a widget. :^)
|
|
Another instance of "Rect::right() is the last pixel *inside* the rect,
not the first pixel outside the rect" messing me up.
|
|
We need a way to get a bold version of the default fixed-width font.
|
|
This parses hex colors in either #RRGGBBAA or #RRGGBB format.
No other formats are supported at the moment.
|
|
Found by PVS-Studio.
|
|
It was a tad too bright. Also make sure we're using the same color in
all the different places. At some point it would be nice to improve global
color settings, etc.
|
|
|
|
We were installing libraries into /Libraries/Root, rather than in /Root.
This made the ports system behave rather unpredictable, since I had old
versions of things in /Root and new versions of things in /Libraries/Root.
|
|
We've been using a per-directory "install.sh" for some time, so let's get
rid of the old way of doing things.
|
|
Now you can ask for e.g Size::primary_size_for_orientation(Orientation).
|
|
These are useful when doing widgets that can be switched between vertical
and horizontal mode, such as GSlider. The idea is that instead of using
"x" and "y" directly, you use the "primary" and "secondary" offset/size
for the Orientation you're configured in.
|
|
|
|
|
|
Instead of LibGUI and WindowServer building their own copies of the drawing
and graphics code, let's it in a separate LibDraw library.
This avoids building the code twice, and will encourage better separation
of concerns. :^)
|