pub fn new() -> (DrawingTarget, DrawStream) {
        // Create the core
        let core    = Arc::new(Desync::new(DrawStreamCore::new()));
        core.desync(|core| core.add_usage());

        // Create the stream
        let stream  = DrawStream::with_core(&core);

        // Create the context
        let context = DrawingTarget {
            stream_core: core
        };

        (context, stream)
    }
///
/// Creates a new drawing target and a stream that can be used to read the instructions sent to it
///
Creates a new drawing target and a stream that can be used to read the instructions sent to it
Creates a new drawing target and a stream that can be used to read the instructions sent to it
pub fn new() -> (DrawingTarget, DrawStream) {
        // Create the core
        let core    = Arc::new(Desync::new(DrawStreamCore::new()));
        core.desync(|core| core.add_usage());
        // Create the stream
        let stream  = DrawStream::with_core(&core);
        // Create the context
        let context = DrawingTarget {
            stream_core: core
        };
        (context, stream)
    }
pub fn new ( ) -> ( DrawingTarget , DrawStream ) { // Create the core let core = Arc :: new ( Desync :: new ( DrawStreamCore :: new ( ) ) ) ; core . desync ( | core | core . add_usage ( ) ) ; // Create the stream let stream = DrawStream :: with_core ( & core ) ; // Create the context let context = DrawingTarget { stream_core : core } ; ( context , stream ) }
Creates a new drawing target and a stream that can be used to read the instructions sent to it
Creates a new drawing target and a stream that can be used to read the instructions sent to it