1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
Commit graph

241 commits

Author SHA1 Message Date
reuk
5befcd43a9
EdgeTable: Use CopyableHeapBlock in implementation 2024-09-05 12:10:33 +01:00
attila
dda0719d56
EdgeTable: Fix buggy clipToRegion corner case 2024-08-06 17:36:10 +01:00
attila
22ee31f3ff EdgeTable: Use HeapBlock instead of vector for better Android Debug drawing performance
This is reverting 417d97b36e.
2024-08-02 14:48:52 +00:00
reuk
e11b8f5ccb
CoreGraphics: Slightly shrink excluded clip regions in order to draw transformed opaque components without border artefacts
Previously, drawing an opaque, scaled component with CoreGraphics could
lead to visible artefacts around the edge of the component.

When drawing the parent of an opaque component, the area covered by the
opaque component is excluded from the clip region. If the clip region is
non-integral when transformed into device space, anti-aliasing will be
applied on the edges of the clip region. Similarly, when drawing the
opaque component itself, anti-aliasing will be applied at the edges of
the component. When the two drawings are superimposed, the foreground
anti-aliased pixels will be blended with the background anti-aliased
pixels, leading to a noticeable border around the component. Ideally,
only the foreground anti-aliasing should be applied, and the background
should not be anti-aliased around its edges.
2024-05-20 12:49:55 +01:00
reuk
bd2aea9676
AffineTransform: Add isOnlyTranslationOrScale() helper 2024-05-20 12:49:55 +01:00
reuk
0444e3d69c
EdgeTable: Avoid reinterpret_cast in multiplyLevels 2024-05-20 12:49:55 +01:00
reuk
ce0fe3dc1e
EdgeTable: Keep better track of buffer memory ranges
Occasionally, on Linux, Address Sanitizer can complain about a memory
region overlap in the arguments to memcpy, originating in
EdgeTable::intersectWithEdgeTableLine. I haven't been able to reproduce
this personally.

The final memcpy call in this function requires there to be
"srcNum1 * 2" valid entries after the current "src1" ptr, and none of
those entries may overlap with the area starting at "temp".

On inspection, I think that the memory region being read is too large.
At the point of the call, src1 will point to a LineItem::level, not
LineItem::x, so there will actually be (srcNum1 * 2 - 1) valid items
following it.

All this pointer arithmetic is very difficult to understand. In an
effort to make this function slightly more understandable, I've switched
to using Spans to delineate lines of the table, which makes it easier to
keep track of the size of each line.
2024-05-20 12:49:55 +01:00
reuk
417d97b36e
EdgeTable: Implement using vector to simplify special member functions 2024-05-20 12:49:54 +01:00
reuk
c728d8509d
Point: Disable rotatedAroundOrigin for non-floating-point types
This function cant't give useful results for integer points.
2024-05-08 17:53:52 +01:00
reuk
a0c9a42dbf
Point: Avoid data-loss warning in Point::getDotProduct 2024-05-08 17:53:52 +01:00
reuk
0f0095091b
Line: Avoid data loss warning in Line::findNearestPointTo 2024-05-08 17:53:52 +01:00
reuk
c25a1fe233
AffineTransform: Add basic test for fromTargetPoints 2024-05-08 17:53:52 +01:00
reuk
44a04370a9
Parallelogram: Fix implementations of isEmpty and operator-=
Previously, isEmpty sometimes incorrectly returned true for non-empty
parallelograms.

operator-= called itself, leading to infinite recursion.
2024-05-08 17:53:51 +01:00
reuk
19061e6d17
Direct2D: Add initial support 2024-04-18 14:16:02 +01:00
Tom Poole
94d98a2b10 Update licensing information 2024-04-16 11:39:35 +01:00
attila
c9c2ca0aab Fix float equality warning in Rectangle::enlargeIfAdjacent()
Co-authored-by: Tobias Hienzsch <post@tobias-hienzsch.de>
2023-10-24 18:19:36 +02:00
Tom Poole
6bf9bb9a2e Add final specifiers in implementation files 2023-10-10 16:12:38 +01:00
Tom Poole
7d45d498b9 Removed some superfluous consts from definitions 2023-09-20 16:31:10 +01:00
Tom Poole
0dfaa98e86 Rectangle: Add nodiscard to some methods 2023-09-15 16:30:10 +01:00
Tom Poole
3aa5d96e67 approximatelyEqual: Fix some compilation errors 2023-08-22 10:16:52 +01:00
Anthony Nicholls
2bb530f636 approximatelyEqual: Add customisable tolerances for floating-point comparisons 2023-08-17 12:47:53 +00:00
reuk
c8c4cdc7d5
EdgeTable: Add offset before truncating to somewhat restore old rounding behaviour 2023-06-08 15:05:43 +01:00
reuk
4f67a18a3f
EdgeTable: Avoid integer truncation when rendering paths with large coordinates
Previously, if the PathFlatteningIterator returned a line segment with
very large x or y positions, the result of
    roundToInt (iter.y1 * 256.0f)
could be incorrect, if the result was too large to fit in an int.

Using int64_t to store intermediate results, converting to int when
updating the edge table itself produces accurate results for a wider
range of inputs.
2023-06-01 18:49:32 +01:00
reuk
28414a6af8
Global: Avoid floating-point equality checks where possible 2023-04-04 19:55:11 +01:00
reuk
a6638f8a6d
Path: Allow addPath to take a reference to self 2023-02-15 22:23:56 +00:00
reuk
cb14aa983d
Path: Allow addPath to take a reference to self 2023-02-09 17:54:19 +00:00
reuk
d7f3ae4fc1
RectangleList: Avoid entering a death spiral when subtracting very close rectangles 2022-12-14 11:12:31 +00:00
reuk
7c14c1fcd7
Use more concise stdlib type aliases 2022-09-26 18:03:47 +01:00
reuk
8b8ae10059
Build: Replace JUCE_NODISCARD with [[nodiscard]] 2022-09-12 16:14:57 +01:00
attila
6f3fb5a29f Linux: Adjust natively reported border size by the current scale factor 2022-05-19 12:06:38 +02:00
Tom Poole
2ec861d99e Update licensing banners to JUCE 7 2022-05-16 17:55:48 +01:00
Tom Poole
dea3fe60e4 Update copyright banners 2022-04-04 12:36:32 +01:00
reuk
ae646dde16
StandaloneFilterWindow: Account for native frame size in constrainer 2022-04-01 16:41:47 +01:00
Tom Poole
ed4f638ff7 Line: Add explicit methods for lengthening the start and end points 2022-03-24 14:01:34 +00:00
Tom Poole
0d82541728 Point: Fix a division by zero in getPointAlongLine 2022-03-17 11:34:32 +00:00
Tom Poole
04a8a44a85 Make Path::intersectsLine const 2022-02-24 14:20:08 +00:00
reuk
1d1d743b9f
Build: Add -Wdeprecated to recommended flags and fix new warnings 2022-02-23 10:56:10 +00:00
reuk
b80927fc91
Nodiscard: Add to builder-pattern functions 2022-01-27 18:43:21 +00:00
reuk
44b34be183
Rectangle: Add string conversion functions for floats and doubles 2021-11-24 16:20:37 +00:00
ed
b9542ccc4c Update code to use C++14 [[deprecated]] attribute
This commit removes the various compiler-specific JUCE_DEPRECATED macros and replaces them with C++14's deprecated attribute. It also removes the JUCE_CATCH_DEPRECATED_CODE_MISUSE flag as we can rely on the override specifier catching usage of these old virtual methods, and tidies up the DOXYGEN preprocessor checks as they were inconsistent across the codebase.
2021-09-29 16:14:00 +01:00
reuk
1a4296e98b
EdgeTable: Avoid shifts of negative numbers 2021-09-28 14:04:10 +01:00
reuk
8dc7636fc4
PathFlatteningIterator: Ensure iterator terminates when flattening paths with very large coordinate values 2021-06-04 13:04:24 +01:00
reuk
31a7c62baf
Windows: Fix and suppress some analysis warnings
This fixes warnings that are emitted when building with the `-analyze`
flag enabled.
2021-05-26 15:34:26 +01:00
reuk
64b9366e8f
CharacterFunctions: Add new function to move pointer past whitespace 2021-02-18 10:54:29 +00:00
reuk
754ec66b42
Point: Fix incorrect type conversions in operator* and operator/ 2020-07-10 12:25:54 +01:00
reuk
394c4fd475 Clang: Fix warnings when building with clang 10 2020-07-01 10:00:43 +01:00
ed
009d685179 Updated all license headers 2020-06-29 08:30:22 +01:00
reuk
1502a3a8f2
Clang: Fix errors when building with clang on windows with C++20 enabled 2020-06-08 18:10:50 +01:00
ed
3ccbf8bc74 Use getDeterminant() method in AffineTransform::inverted() 2020-06-05 09:55:51 +01:00
ed
b77b14c6c3 Fixed some incorrect documentation examples for the Rectangle::removeFromRight() and ::removeFromBottom() methods 2020-05-22 11:22:43 +01:00