Method MapInputRectsToOutputRect
- Namespace
- PaintDotNet.Direct2D1
- Assembly
- PaintDotNet.Windows.dll
MapInputRectsToOutputRect(ReadOnlySpan<RectInt32>, ReadOnlySpan<RectInt32>, out RectInt32, out RectInt32)
Performs the inverse mapping to MapOutputRectToInputRects.
void MapInputRectsToOutputRect(ReadOnlySpan<RectInt32> inputRects, ReadOnlySpan<RectInt32> inputOpaqueSubRects, out RectInt32 outputRect, out RectInt32 outputOpaqueSubRect)
Parameters
inputRectsReadOnlySpan<RectInt32>An array of input rectangles to be mapped to the output rectangle. The inputRects parameter is always equal to the input bounds.
inputOpaqueSubRectsReadOnlySpan<RectInt32>An array of input rectangles to be mapped to the opaque output rectangle.
outputRectRectInt32The output rectangle that maps to the corresponding input rectangle.
outputOpaqueSubRectRectInt32The output rectangle that maps to the corresponding opaque input rectangle. Set this to RectInt32.Zero to indicate that the whole output region may have transparency.
Remarks
The transform implementation must ensure that any pixel shader or software callback implementation it
provides honors this calculation.
Unlike the MapOutputRectToInputRects and MapInvalidRect functions, this method is explicitly called by
the renderer at a determined place in its rendering algorithm. The transform implementation may change
its state based on the input rectangles and use this information to control its rendering information.
This method is always called before the MapInvalidRect(int, RectInt32, out RectInt32) and MapOutputRectToInputRects(RectInt32, Span<RectInt32>)
methods of the transform.