/// Creates a new native surface with uninitialized data.
Creates a new native surface with uninitialized data.
Creates a new native surface with uninitialized data .
pub fn new(native_context: &NativePaintingGraphicsContext,
               size: Size2D<i32>,
               stride: i32)
               -> NativeSurface {
        if native_context.display == ptr::null_mut() {
            NativeSurface::MemoryBuffer(MemoryBufferNativeSurface::new(native_context, size, stride))
        } else {
            NativeSurface::Pixmap(PixmapNativeSurface::new(native_context, size, stride))
        }
   }
pub fn new ( native_context : & NativePaintingGraphicsContext , size : Size2D < i32 > , stride : i32 ) -> NativeSurface { if native_context . display == ptr :: null_mut ( ) { NativeSurface :: MemoryBuffer ( MemoryBufferNativeSurface :: new ( native_context , size , stride ) ) } else { NativeSurface :: Pixmap ( PixmapNativeSurface :: new ( native_context , size , stride ) ) } }
Creates a new native surface with uninitialized data.
Creates a new native surface with uninitialized data .
native_context
&NativePaintingGraphicsContext
size
Size2D<i32>
stride
i32