Example #1
0
        /// <summary>
        /// Adds a new track drawing.
        /// </summary>
        public void AddTrack(DrawingTrack track)
        {
            trackManager.AddDrawing(track);

            track.ParentMetadata = this;

            if (lastUsedTrackerParameters != null)
            {
                track.TrackerParameters = lastUsedTrackerParameters;
            }

            track.TrackerParametersChanged += Track_TrackerParametersChanged;

            hitDrawing = track;

            AfterDrawingCreation(track);

            // The following is necessary for the "undo of deletion" case.
            track.UpdateKinematics();
            track.IntegrateKeyframes();

            if (DrawingAdded != null)
            {
                DrawingAdded(this, new DrawingEventArgs(track, trackManager.Id));
            }
        }
Example #2
0
        public void ModifiedDrawing(Guid managerId, Guid drawingId)
        {
            AbstractDrawing drawing = GetDrawing(managerId, drawingId);
            DrawingTrack    track   = drawing as DrawingTrack;

            if (track != null)
            {
                track.UpdateKinematics();
                track.IntegrateKeyframes();
            }

            if (DrawingModified != null)
            {
                DrawingModified(this, new DrawingEventArgs(drawing, managerId));
            }
        }