ladybird/Userland/Libraries
Rodrigo Tobar 82bac7e665 LibPDF: Fix clipping of painting operations
While the clipping logic was correct (current v/s new clipping path),
the clipping path contents weren't. This commit fixed that.

We calculate the clipping path in two places: when we set it to be the
whole page at graphics state creation time, and when we perform clipping
path intersection to calculate a new clipping path. The clipping path is
then used to limit painting by passing it to the painter (more
precisely, but passing its bounding box to the painter, as the latter
doesn't support arbitrary path clipping). For this last point the
clipping path must be in device coordinates.

There was however a mix of coordinate systems involved in the creation,
update and usage of the clipping path:

 * The initial values of the path (i.e., the whole page) were in user
   coordinates.
 * Clipping path intersection was performed against m_current_path,
   which is in device coordinates.
 * To perform the clipping operation, the current clipping path was
   assumed to be in user coordinates.

This mix resulted in the clipping not working correctly depending on the
zoom level at which one visualised a page.

This commit fixes the issue by always keeping track of the clipping path
in device coordinates. This means that the initial full-page contents
are now converted to device coordinates before putting them in the
graphics state, and that no mapping is performed when applied the
clipping to the painter.
2023-02-04 12:29:57 +01:00
..
LibArchive AK: Move Stream and SeekableStream from LibCore 2023-01-29 19:16:44 -07:00
LibAudio AK: Move memory streams from LibCore 2023-01-29 19:16:44 -07:00
LibC AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
LibCards AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
LibChess AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
LibCodeComprehension AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
LibCompress AK: Move memory streams from LibCore 2023-01-29 19:16:44 -07:00
LibConfig LibConfig+LibCore+ConfigServer: Support u32 configuration entries 2022-12-23 23:26:21 +01:00
LibCore AK: Move memory streams from LibCore 2023-01-29 19:16:44 -07:00
LibCoredump AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
LibCpp AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
LibCrypt AK: Stop using DeprecatedString in Base64 encoding 2022-12-20 10:34:19 +01:00
LibCrypto AK: Deprecate the old AK::Stream 2023-01-29 19:16:44 -07:00
LibDebug AK: Move memory streams from LibCore 2023-01-29 19:16:44 -07:00
LibDesktop LibDesktop: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-26 09:57:14 -05:00
LibDeviceTree AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
LibDiff LibDiff: Make Diff::generate_only_additions take text as StringView 2022-12-20 10:58:54 +01:00
LibDNS AK: Move memory streams from LibCore 2023-01-29 19:16:44 -07:00
LibDSP AK: Remove try_ prefix from FixedArray creation functions 2023-01-28 22:41:36 +01:00
LibEDID AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
LibELF LibElf: Remove declarations for non-existent methods 2023-01-27 20:33:18 +00:00
LibFileSystemAccessClient LibFileSystemAccessClient: Add functions returning FSAC::File 2023-01-07 10:53:43 +00:00
LibGemini AK: Move Stream and SeekableStream from LibCore 2023-01-29 19:16:44 -07:00
LibGfx LibGfx: Give ICC::TagType a virtual destructor 2023-02-01 19:19:30 +01:00
LibGL LibGL: Remove DeprecatedString usage 2023-01-30 13:49:52 -05:00
LibGLSL Everywhere: Convert known short-strings to the infallible String factory 2023-01-20 14:24:12 -05:00
LibGPU LibGPU: Remove DeprecatedString usage 2023-01-30 13:49:52 -05:00
LibGUI LibGUI: Use the correct font when relayouting Breadcrumbbar 2023-02-02 14:49:54 +01:00
LibHTTP AK: Move memory streams from LibCore 2023-01-29 19:16:44 -07:00
LibIDL AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
LibImageDecoderClient LibGfx: Re-work the abstractions of sending image for decoding over IPC 2023-01-20 15:13:31 +00:00
LibIMAP AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
LibIPC AK: Move Stream and SeekableStream from LibCore 2023-01-29 19:16:44 -07:00
LibJS LibJS: Format the era of ISO year 0 as BC 2023-02-02 12:12:26 +00:00
LibKeyboard LibKeyboard: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-26 09:57:14 -05:00
LibLine LibLine: Quit event loop when an error occurs on update 2023-02-01 01:04:42 +03:30
LibLocale LibLocale: Remove last use of DeprecatedString from LibLocale 2023-01-28 00:13:59 +00:00
LibMain
LibManual Help+LibManual: Open sibling page for subsections 2023-01-02 06:15:13 -07:00
LibMarkdown AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
LibPartition
LibPCIDB AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
LibPDF LibPDF: Fix clipping of painting operations 2023-02-04 12:29:57 +01:00
LibProtocol LibWeb+LibWebSocket: DOM WebSocket subprotocol support 2023-02-02 14:41:34 +01:00
LibRegex AK: Remove StringBuilder::build() in favor of to_deprecated_string() 2023-01-27 20:38:49 +00:00
LibSanitizer
LibSoftGPU LibSoftGPU: Only enable texture stages if required 2023-02-02 14:38:26 +01:00
LibSQL LibSQL+SQLServer: Send result column names over IPC to SQL clients 2023-02-03 20:34:45 +01:00
LibSymbolication LibSymbolication: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-26 09:57:14 -05:00
LibSyntax LibSyntax: Add common_language_extension() function 2022-12-19 14:13:50 -05:00
LibSystem
LibTest LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors 2023-01-29 00:02:45 +00:00
LibTextCodec LibTextCodec: Add a MacRoman decoder 2023-01-24 14:37:20 +00:00
LibThreading Everywhere: Remove unused includes of AK/Format.h 2023-01-02 20:27:20 -05:00
LibTimeZone AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
LibTLS AK: Deprecate the old AK::Stream 2023-01-29 19:16:44 -07:00
LibUnicode AK+LibUnicode: Provide Unicode-aware caseless String matching 2023-01-18 14:43:40 +00:00
LibUSBDB AK+Everywhere: Rename String to DeprecatedString 2022-12-06 08:54:33 +01:00
LibVideo LibVideo/VP9: Use proper indices for updating inter_mode probabilities 2023-02-03 09:10:14 +01:00
LibVirtGPU Kernel+Userland: Move LibC/sys/ioctl_numbers to Kernel/API/Ioctl.h 2023-01-21 10:43:59 -07:00
LibVT LibGfx: Remove try_ prefix from bitmap creation functions 2023-01-26 20:24:37 +00:00
LibWasm AK: Move memory streams from LibCore 2023-01-29 19:16:44 -07:00
LibWeb LibWeb: Implement CanvasRenderingContext2D.createPattern() 2023-02-03 20:36:21 +01:00
LibWebSocket LibWeb+LibWebSocket: DOM WebSocket subprotocol support 2023-02-02 14:41:34 +01:00
LibWebView LibWeb+LibWebSocket: DOM WebSocket subprotocol support 2023-02-02 14:41:34 +01:00
LibX86 LibX86: Remove i686 support 2022-12-28 11:53:41 +01:00
LibXML LibXML: Remove declarations for non-existent methods 2023-01-27 20:33:18 +00:00
CMakeLists.txt LibVirtGPU: Add a new GPU device that talks to our VirtIO-GPU driver 2022-12-26 09:39:20 +01:00