Ejemplo n.º 1
0
        private void btn_bitmapFitToCanvas_Click(object sender, EventArgs e)
        {
            if (Program.MainTimeline.SelectedKeyframe == null)
            {
                return;
            }
            if (Program.MainTimeline.SelectedKeyframe.State.GetType() != typeof(BitmapObject.State))
            {
                return;
            }

            BitmapObject.State state = Program.MainTimeline.SelectedKeyframe.State as BitmapObject.State;

            state.Bounds.Location = new PointF(0, 0);
            state.Bounds.Size     = new SizeF(Program.ActiveProject.Width, Program.ActiveProject.Height);

            Program.MainTimeline.GLContext.Invalidate();
        }
Ejemplo n.º 2
0
        private void num_bitmapAlpha_ValueChanged(object sender, EventArgs e)
        {
            if (Program.MainTimeline.SelectedKeyframe == null)
            {
                return;
            }
            if (Program.MainTimeline.SelectedKeyframe.State.GetType() != typeof(BitmapObject.State))
            {
                return;
            }

            tkb_bitmapAlpha.Value = (int)num_bitmapAlpha.Value;

            BitmapObject.State state = Program.MainTimeline.SelectedKeyframe.State as BitmapObject.State;

            state.BitmapAlpha = (int)num_bitmapAlpha.Value;

            Program.MainTimeline.GLContext.Invalidate();
        }