mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Core - Fix profile rendering and timeline bugs found by the tests (#909)
* Core - Keep the name of renamed layer effects when loading BaseLayerEffect.Load checked HasBeenRenamed before reading it from the entity, so renamed effects always fell back to the descriptor's display name. * Core - Apply layer effect filters once on layers Layer.DelegateRendering composited the layer with the pre-processed paint and also handed that paint to the brush, so color and image filters of effects applied to the brush output and again when compositing. The brush now gets a copy of the paint without those filters, like folders which apply them once. * Core - Disable folders that get suspended while enabled Layer.Update disables a suspended layer but Folder.Update only disabled a folder once its timeline finished, so a folder suspended outside of the editor kept rendering its children. * Core - Update device LEDs when rotating or scaling a device The Rotation and Scale setters only updated the RGB.NET device, the Artemis LED rectangles and the device path kept their old positions and DeviceUpdated wasn't raised until X or Y was set. * Core - Correct the docs of the Layer and Folder constructors They claimed the new element adds itself to the child collection of the parent, it doesn't and callers rely on adding it themselves. * Core - Apply layer opacity once for brushes that draw with the paint Brushes drawing with a shader or image keep the alpha of the paint they are given, so the layer opacity and opacity effects applied to the brush output and again when compositing, 50% opacity rendered at 25%. The brush now gets an opaque paint, per-LED brushes already overrode the color. The solid color test brush now draws with a shader like the real solid brush so the opacity tests cover this. * Tests - Describe expected faded colors by their opacity Adds an AtOpacity helper so assertions read as red at 50% over black instead of a hand-computed 127, and uses it for layer opacity, opacity effects, folder fades, the profile fade and semi-transparent drawing. * Core - Wrap timelines around by how far they went past the main segment Repeating timelines wrapped around by the frame time rather than by how far they went past the end of the main segment, so wrapping could be off by up to a frame. A timeline that was already past the end, like the finished timeline new layers start with, still starts the main segment over. * Tests - Mention the defaults the timeline wrap-around tests depend on
This commit is contained in:
1 parent
504845c7d2
commit
a25d0f0c9c
18 files changed
+174
-67
No files matched your search
@@ -122,7 +122,7 @@ public sealed class RenderHarness : IRenderer, IDisposable
|
||||
/// <returns>The layer and its brush, the brush exposes the brush properties</returns>
|
||||
public (Layer Layer, TBrush Brush) AddLayer<TBrush>(Folder parent, IEnumerable<ArtemisLed> leds, string name = "Test layer", int? order = null) where TBrush : BaseLayerBrush
|
||||
{
|
||||
// Note: despite its documentation the Layer constructor does not add the layer to the parent
|
||||
// The Layer constructor does not add the layer to the parent
|
||||
Layer layer = new(parent, name);
|
||||
parent.AddChild(layer, order);
|
||||
layer.AddLeds(leds);
|
||||
|
||||
Reference in new issue
Block a user