pub struct RasterizationRateMapDescriptor(/* private fields */);Expand description
A descriptor for creating a rasterization rate map.
C++ equivalent: MTL::RasterizationRateMapDescriptor
Implementations§
Source§impl RasterizationRateMapDescriptor
impl RasterizationRateMapDescriptor
Sourcepub fn new() -> Option<Self>
pub fn new() -> Option<Self>
Create a new rasterization rate map descriptor.
C++ equivalent: static RasterizationRateMapDescriptor* alloc()->init()
Sourcepub fn with_screen_size(screen_size: Size) -> Option<Self>
pub fn with_screen_size(screen_size: Size) -> Option<Self>
Create a rasterization rate map descriptor with screen size.
C++ equivalent: static RasterizationRateMapDescriptor* rasterizationRateMapDescriptor(MTL::Size screenSize)
Sourcepub fn with_screen_size_and_layer(
screen_size: Size,
layer: &RasterizationRateLayerDescriptor,
) -> Option<Self>
pub fn with_screen_size_and_layer( screen_size: Size, layer: &RasterizationRateLayerDescriptor, ) -> Option<Self>
Create a rasterization rate map descriptor with screen size and a single layer.
C++ equivalent: static RasterizationRateMapDescriptor* rasterizationRateMapDescriptor(MTL::Size screenSize, const MTL::RasterizationRateLayerDescriptor* layer)
Sourcepub fn set_label(&self, label: &str)
pub fn set_label(&self, label: &str)
Set the label.
C++ equivalent: void setLabel(const NS::String* label)
Sourcepub fn screen_size(&self) -> Size
pub fn screen_size(&self) -> Size
Get the screen size.
C++ equivalent: Size screenSize() const
Sourcepub fn set_screen_size(&self, screen_size: Size)
pub fn set_screen_size(&self, screen_size: Size)
Set the screen size.
C++ equivalent: void setScreenSize(MTL::Size screenSize)
Sourcepub fn layer_count(&self) -> UInteger
pub fn layer_count(&self) -> UInteger
Get the layer count.
C++ equivalent: NS::UInteger layerCount() const
Sourcepub fn layers(&self) -> RasterizationRateLayerArray
pub fn layers(&self) -> RasterizationRateLayerArray
Get the layers array.
C++ equivalent: RasterizationRateLayerArray* layers() const
Sourcepub fn layer(
&self,
layer_index: UInteger,
) -> Option<RasterizationRateLayerDescriptor>
pub fn layer( &self, layer_index: UInteger, ) -> Option<RasterizationRateLayerDescriptor>
Get a layer at the specified index.
C++ equivalent: RasterizationRateLayerDescriptor* layer(NS::UInteger layerIndex)
Sourcepub fn set_layer(
&self,
layer: &RasterizationRateLayerDescriptor,
layer_index: UInteger,
)
pub fn set_layer( &self, layer: &RasterizationRateLayerDescriptor, layer_index: UInteger, )
Set a layer at the specified index.
C++ equivalent: void setLayer(const MTL::RasterizationRateLayerDescriptor* layer, NS::UInteger layerIndex)