Exemplo n.º 1
0
        /// <summary>
        /// Creates a new GraphicContext from <seealso cref="IFrameBuffer"/>
        /// </summary>
        /// <param name="buffer"></param>
        /// <returns></returns>
        public static GraphicContext FromBuffer(IFrameBuffer buffer)
        {
            var c = new GraphicContext();

            c._buffer = buffer;
            c.OffSet  = new Point(0, 0);
            c.Size    = new Size(buffer.Width, buffer.Height);

            return(c);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Set the Parent of the GraphicContext
 /// </summary>
 /// <param name="gc"></param>
 public void SetParent(GraphicContext gc)
 {
     _buffer = gc.GetBuffer();
     Size    = gc.Size;
 }