Esempio n. 1
0
        public void OutlineClipVideoHover(
            Graphics g,
            VidkaClipVideo vclip,
            ProjectDimensions dimdim,
            int Height,
            TrimDirection trimDirection,
            int trimBracketLength,
            long framesActiveMouseTrim)
        {
            int y1 = dimdim.getY_main1(Height);
            int y2 = dimdim.getY_main2(Height);
            //int yaudio = dimdim.getY_main_half(Height);
            int x1    = dimdim.getScreenX1(vclip);
            int clipW = dimdim.convert_FrameToAbsX(vclip.LengthFrameCalc);             // hacky, I know

            g.DrawRectangle(penHover, x1, y1, clipW, y2 - y1);
            if (trimDirection == TrimDirection.Left)
            {
                drawTrimBracket(g, x1, y1, y2, TrimDirection.Left, trimBracketLength, dimdim.convert_FrameToAbsX(framesActiveMouseTrim), dimdim);
            }
            if (trimDirection == TrimDirection.Right)
            {
                drawTrimBracket(g, x1 + clipW, y1, y2, TrimDirection.Right, trimBracketLength, dimdim.convert_FrameToAbsX(framesActiveMouseTrim), dimdim);
            }
        }
Esempio n. 2
0
        public void PrepareCanvas(Graphics g, ProjectDimensions dimdim, int w, int h, ProjectDimensionsTimelineType hover)
        {
            int yMain1    = dimdim.getY_main1(h);
            int yMain2    = dimdim.getY_main2(h);
            int yMainHalf = dimdim.getY_main_half(h);
            int yAudio1   = dimdim.getY_audio1(h);
            int yAudio2   = dimdim.getY_audio2(h);

            g.FillRectangle((hover == ProjectDimensionsTimelineType.Main) ? brushLightGray2 : brushLightGray, 0, yMain1, w, yMainHalf - yMain1);
            g.FillRectangle((hover == ProjectDimensionsTimelineType.Main) ? brushLightGray3 : brushLightGray2, 0, yMainHalf, w, yMain2 - yMainHalf);
            g.FillRectangle((hover == ProjectDimensionsTimelineType.Audios) ? brushLightGray3 : brushLightGray2, 0, yAudio1, w, yAudio2 - yAudio1);
        }
Esempio n. 3
0
        public void DrawProjectVideoTimeline(
            Graphics g,
            int Width,
            int Height,
            VidkaProj proj,
            VidkaFileMapping projMapping,
            ProjectDimensions dimdim,
            VidkaClipVideo currentVideoClip,
            EditorDraggy draggy)
        {
            // draw video events
            long curFrame = 0;

            int y1     = dimdim.getY_main1(Height);
            int y2     = dimdim.getY_main2(Height);
            int yaudio = dimdim.getY_main_half(Height);
            int cliph  = y2 - y1;            // clip height (video and audio)
            int clipvh = yaudio - y1;        // clip (only video) height (just the video part, no audio!)
            int index  = 0;
            int draggyVideoShoveIndex = dimdim.GetVideoClipDraggyShoveIndex(draggy);

            foreach (var vclip in proj.ClipsVideo)
            {
                if (dimdim.isEvenOnTheScreen(curFrame, curFrame + vclip.LengthFrameCalc, Width))
                {
                    if (draggy.Mode == EditorDraggyMode.VideoTimeline && draggyVideoShoveIndex == index)
                    {
                        drawDraggyVideo(g, curFrame, y1, cliph, clipvh, draggy, dimdim);
                        curFrame += draggy.FrameLength;
                    }

                    if (draggy.VideoClip != vclip)
                    {
                        var brush = brushWhite;
                        if (vclip == currentVideoClip && vclip.IsLocked)
                        {
                            brush = brushLockedActiveClip;
                        }
                        else if (vclip == currentVideoClip)
                        {
                            brush = brushActive;
                        }
                        else if (vclip.IsLocked)
                        {
                            brush = brushLockedClip;
                        }
                        drawVideoClip(g, vclip,
                                      curFrame, y1, cliph, clipvh,
                                      brush,
                                      proj, projMapping, dimdim
                                      );
                    }
                }

                index++;
                if (draggy.VideoClip != vclip)
                {
                    curFrame += vclip.LengthFrameCalc;
                }
            }

            if (draggy.Mode == EditorDraggyMode.VideoTimeline && draggyVideoShoveIndex == index)
            {
                drawDraggyVideo(g, curFrame, y1, cliph, clipvh, draggy, dimdim);
            }
        }