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

252 commits

Author SHA1 Message Date
reuk
83e5264c86
Formatting: Remove double-dots from comments and other strings 2025-11-18 15:47:42 +00:00
reuk
bd5e4415f9
RectangleList: DRY implementation of subtract() and avoid unnecessary allocations for int-based rectangle lists 2025-10-21 14:26:35 +01:00
reuk
d10c5c36e3
RectangleList: Avoid infinite loops due to numerical precision issues 2025-10-21 14:23:59 +01:00
reuk
92573ca1ad
RectangleList: Remove some curly braces 2025-10-20 17:34:48 +01:00
reuk
7f22db449a
AffineTransform: Add horizontalFlip() 2025-10-20 17:34:47 +01:00
reuk
50b51f512a
juce_audio_processors_headless: Remove juce_graphics dependency 2025-09-17 12:50:08 +01:00
Anthony Nicholls
36d07a6ce3 Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00
Mathieu Demange
980926d4a6 Reword isSingularity() brief to avoid Doxygen line break
The last period in "i.e." was previously interpreted as the end of a brief description.
2025-05-09 12:57:02 +01:00
reuk
9bdf69e499
PathStrokeType: Avoid unnecessarily starting new subpaths 2025-02-11 18:11:12 +00:00
reuk
19edd53842
EdgeTable: Fix issue where edges of paths could be anti-aliased incorrectly at edges of clip regions 2025-02-03 19:16:46 +00:00
attila
83720ac462 EdgeTable: Fix assertion caused by unnecessarily storing prepending zero levels
This partially restores the behaviour prior to commit
dda0719d56, in that we will never store a
segment if its level equals the last stored level.
2024-09-05 17:36:51 +02:00
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