示例#1
0
 public DrawingSession CreateNewDrawingSession()
 {
     if (this.activeDrawingSession != null)
     {
         return(this.activeDrawingSession);
     }
     this.activeDrawingSession = new DrawingSession(this);
     return(this.activeDrawingSession);
 }
示例#2
0
 void InitDrawingSession()
 {
     ft.FlashMessage(Color.white, "Tap to begin drawing.");
     drawingSession = new DrawingSession();
     drawingSession.trackedPosiitons = new List <Vector3>();
     distanceNeededText.text         = distanceNeeded.ToString("#.0");
     fill.fillAmount = 0;
     SetState(State.Ready);
     drawingSession.greenPointsAtStart  = Utils2.PlaceNoteGreenPoints(0).Length;
     drawingSession.greenPointsAcquired = 0;
 }
 public void Dispose()
 {
     if (ShouldDisposeOfInput)
     {
         InputFrame.Dispose();
     }
     if (ShouldDisposeOfOutput)
     {
         OutputFrame.Dispose();
     }
     DrawingSession.Dispose();
 }
示例#4
0
        public UniversalBitmap CloneToNewSize(int width, int height)
        {
            UniversalBitmap newBitmap = new UniversalBitmap(width, height);
            DrawingSession  g         = newBitmap.CreateNewDrawingSession();

            if (width == this.Width && height == this.Height)
            {
                g.Blit(this, 0, 0);
            }
            else
            {
                g.BlitStretched(this, 0, 0, width, height);
            }
            g.Flush();
            newBitmap.activeDrawingSession = null;
            newBitmap.pixelBuffer          = null;
            return(newBitmap);
        }