We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5abbb1 commit 542b7c9Copy full SHA for 542b7c9
piet-coregraphics/src/lib.rs
@@ -134,7 +134,7 @@ impl CoreGraphicsImage {
134
false => CoreGraphicsImage::YUp(image),
135
}
136
137
- pub fn as_ref(&self) -> Option<&CGImage> {
+ pub fn as_cgimage(&self) -> Option<&CGImage> {
138
match self {
139
CoreGraphicsImage::Empty => None,
140
CoreGraphicsImage::YUp(image) | CoreGraphicsImage::YDown(image) => Some(image),
@@ -758,7 +758,7 @@ mod tests {
758
.capture_image_area(Rect::new(100.0, 100.0, 200.0, 200.0))
759
.unwrap();
760
761
- let unwrapped_copy = copy.as_ref().unwrap();
+ let unwrapped_copy = copy.as_cgimage().unwrap();
762
let rewrapped_copy = CoreGraphicsImage::from_cgimage_and_ydir(unwrapped_copy.clone(), true);
763
764
piet.draw_image(
0 commit comments