diff --git a/azure_hl.rs b/azure_hl.rs index 56e2a29..fa00d8f 100644 --- a/azure_hl.rs +++ b/azure_hl.rs @@ -38,7 +38,7 @@ use geom::size::Size2D; use layers::platform::surface::{NativeGraphicsMetadata, NativePaintingGraphicsContext}; use libc::types::common::c99::{uint8_t, uint16_t}; use libc::size_t; -use std::cast; +use std::mem; use std::ptr; use std::ptr::null; use std::slice; @@ -387,7 +387,7 @@ impl DrawTarget { format: SurfaceFormat) -> DrawTarget { assert!(backend == SkiaBackend); unsafe { - let native_graphics_context = cast::transmute(native_graphics_context); + let native_graphics_context = mem::transmute(native_graphics_context); let skia_context = AzCreateSkiaSharedGLContext(native_graphics_context, &size.as_azure_int_size()); let azure_draw_target = AzCreateSkiaDrawTargetForFBO(skia_context, @@ -573,7 +573,7 @@ impl DrawTarget { pub fn set_transform(&self, matrix: &Matrix2D) { unsafe { - AzDrawTargetSetTransform(self.azure_draw_target, cast::transmute(matrix)); + AzDrawTargetSetTransform(self.azure_draw_target, mem::transmute(matrix)); } } diff --git a/scaled_font.rs b/scaled_font.rs index fa1d136..7391e2f 100644 --- a/scaled_font.rs +++ b/scaled_font.rs @@ -9,7 +9,7 @@ use azure_hl::{BackendType,SkiaBackend}; use azure::{AzCreateScaledFontForNativeFont, AzReleaseScaledFont}; use libc::c_void; -use std::cast; +use std::mem; use std::ptr; #[cfg(target_os="macos")] @@ -45,7 +45,7 @@ pub mod android { pub use scaled_font::android::freetype::freetype::{FT_Face, FT_LOAD_DEFAULT}; } -type SkTypeface = *c_void; +pub type SkTypeface = *c_void; pub struct ScaledFont { azure_scaled_font: AzScaledFontRef, @@ -83,7 +83,7 @@ impl ScaledFont { let style = ((*native_font).style_flags & 3) as u32; let options = AzCreateFontOptions((*native_font).family_name, style); azure_native_font.mType = AZ_NATIVE_FONT_SKIA_FONT_FACE; - azure_native_font.mFont = cast::transmute(options); + azure_native_font.mFont = mem::transmute(options); let azure_native_font_ptr = &azure_native_font; let azure_scaled_font = AzCreateScaledFontForNativeFont(azure_native_font_ptr, size); AzDestroyFontOptions(options); @@ -110,7 +110,7 @@ impl ScaledFont { CoreGraphicsBackend | CoreGraphicsAcceleratedBackend | SkiaBackend => { azure_native_font.mType = AZ_NATIVE_FONT_MAC_FONT_FACE; unsafe { - azure_native_font.mFont = cast::transmute(native_font.as_concrete_TypeRef()); + azure_native_font.mFont = mem::transmute(native_font.as_concrete_TypeRef()); } } _ => {