RenderOptions Struct
Definition
Provides a set of options that control rendering behavior for visuals, including text rendering, bitmap interpolation, edge rendering, blending, and opacity handling.
public struct RenderOptions
Remarks
Use this structure to specify rendering preferences for visual elements. Each property corresponds to a specific aspect of rendering, allowing fine-grained control over how content is displayed. These options can be applied to visuals to influence quality, performance, and visual effects. When merging two instances, unspecified values are inherited from the other instance, enabling layered configuration.
Methods
| Name | Description |
|---|---|
| Equals (2 overloads) | No summary available. |
| GetBitmapBlendingMode | Gets the value of the BitmapBlendingMode attached property for a visual. |
| GetBitmapInterpolationMode | Gets the value of the BitmapInterpolationMode attached property for a visual. |
| GetEdgeMode | Gets the value of the EdgeMode attached property for a visual. |
| GetHashCode | No summary available. |
| GetRequiresFullOpacityHandling | Gets the value of the RequiresFullOpacityHandling attached property for a visual. |
| GetTextRenderingMode | Gets the value of the TextRenderingMode attached property for a visual. |
| MergeWith | No summary available. |
| SetBitmapBlendingMode | Sets the value of the BitmapBlendingMode attached property for a visual. |
| SetBitmapInterpolationMode | Sets the value of the BitmapInterpolationMode attached property for a visual. |
| SetEdgeMode | Sets the value of the EdgeMode attached property for a visual. |
| SetRequiresFullOpacityHandling | No summary available. |
| SetTextRenderingMode | Sets the value of the TextRenderingMode attached property for a visual. |
| ToString | No summary available. |
Equals overloads
Equals Method
public bool Equals(Avalonia.Media.RenderOptions other)
Parameters
other Avalonia.Media.RenderOptions
Returns
bool
Equals Method
public bool Equals(object obj)
Parameters
obj object
Returns
bool
GetBitmapBlendingMode Method
Gets the value of the BitmapBlendingMode attached property for a visual.
public Avalonia.Media.Imaging.BitmapBlendingMode GetBitmapBlendingMode(Avalonia.Visual visual)
Parameters
visual Avalonia.Visual
The control.
Returns
Avalonia.Media.Imaging.BitmapBlendingMode
The value.
GetBitmapInterpolationMode Method
Gets the value of the BitmapInterpolationMode attached property for a visual.
public Avalonia.Media.Imaging.BitmapInterpolationMode GetBitmapInterpolationMode(Avalonia.Visual visual)
Parameters
visual Avalonia.Visual
The control.
Returns
Avalonia.Media.Imaging.BitmapInterpolationMode
The value.
GetEdgeMode Method
Gets the value of the EdgeMode attached property for a visual.
public Avalonia.Media.EdgeMode GetEdgeMode(Avalonia.Visual visual)
Parameters
visual Avalonia.Visual
The control.
Returns
The value.
GetHashCode Method
public int GetHashCode()
Returns
int
GetRequiresFullOpacityHandling Method
Gets the value of the RequiresFullOpacityHandling attached property for a visual.
public Nullable<bool> GetRequiresFullOpacityHandling(Avalonia.Visual visual)
Parameters
visual Avalonia.Visual
The control.
Returns
Nullable<bool>
The value.
GetTextRenderingMode Method
Gets the value of the TextRenderingMode attached property for a visual.
public Avalonia.Media.TextRenderingMode GetTextRenderingMode(Avalonia.Visual visual)
Parameters
visual Avalonia.Visual
The control.
Returns
Avalonia.Media.TextRenderingMode
The value.
MergeWith Method
public Avalonia.Media.RenderOptions MergeWith(Avalonia.Media.RenderOptions other)
Parameters
other Avalonia.Media.RenderOptions
Returns
SetBitmapBlendingMode Method
Sets the value of the BitmapBlendingMode attached property for a visual.
public void SetBitmapBlendingMode(Avalonia.Visual visual, Avalonia.Media.Imaging.BitmapBlendingMode value)
Parameters
visual Avalonia.Visual
The control.
value Avalonia.Media.Imaging.BitmapBlendingMode
The left value.
SetBitmapInterpolationMode Method
Sets the value of the BitmapInterpolationMode attached property for a visual.
public void SetBitmapInterpolationMode(Avalonia.Visual visual, Avalonia.Media.Imaging.BitmapInterpolationMode value)
Parameters
visual Avalonia.Visual
The control.
value Avalonia.Media.Imaging.BitmapInterpolationMode
The value.
SetEdgeMode Method
Sets the value of the EdgeMode attached property for a visual.
public void SetEdgeMode(Avalonia.Visual visual, Avalonia.Media.EdgeMode value)
Parameters
visual Avalonia.Visual
The control.
value Avalonia.Media.EdgeMode
The value.
SetRequiresFullOpacityHandling Method
public void SetRequiresFullOpacityHandling(Avalonia.Visual visual, Nullable<bool> value)
Parameters
visual Avalonia.Visual
value Nullable<bool>
SetTextRenderingMode Method
Sets the value of the TextRenderingMode attached property for a visual.
public void SetTextRenderingMode(Avalonia.Visual visual, Avalonia.Media.TextRenderingMode value)
Parameters
visual Avalonia.Visual
The control.
value Avalonia.Media.TextRenderingMode
The value.
ToString Method
public string ToString()
Returns
string
Properties
| Name | Description |
|---|---|
| BitmapBlendingMode | Gets the blending mode used when rendering bitmap images. |
| BitmapInterpolationMode | Gets the interpolation mode used when rendering bitmap images. |
| EdgeMode | Gets the edge rendering mode used for drawing operations. |
| RequiresFullOpacityHandling | Gets a value indicating whether full opacity handling is required for the associated content. |
| TextRenderingMode | Gets the text rendering mode used to control how text glyphs are rendered. |
BitmapBlendingMode Property
Gets the blending mode used when rendering bitmap images.
public Avalonia.Media.Imaging.BitmapBlendingMode BitmapBlendingMode { get; set; }
Remarks
The blending mode determines how bitmap pixels are composited with the background or other images. Select an appropriate mode based on the desired visual effect, such as transparency or additive blending.
BitmapInterpolationMode Property
Gets the interpolation mode used when rendering bitmap images.
public Avalonia.Media.Imaging.BitmapInterpolationMode BitmapInterpolationMode { get; set; }
Remarks
The interpolation mode determines how bitmap images are scaled or transformed during rendering. Selecting an appropriate mode can affect image quality and performance.
EdgeMode Property
Gets the edge rendering mode used for drawing operations.
public Avalonia.Media.EdgeMode EdgeMode { get; set; }
RequiresFullOpacityHandling Property
Gets a value indicating whether full opacity handling is required for the associated content.
public Nullable<bool> RequiresFullOpacityHandling { get; set; }
TextRenderingMode Property
Gets the text rendering mode used to control how text glyphs are rendered.
public Avalonia.Media.TextRenderingMode TextRenderingMode { get; set; }