C# Class Vidka.Core.ProjectDimensions

显示文件 Open project: miktemk/VidkaEditor Class Usage Examples

Public Methods

Method Description
FrameToSec ( int frame ) : double

Converts frames to seconds

GetVideoClipDraggyShoveIndex ( Vidka.Core.EditorDraggy draggy ) : int

Returns index of the clip before which the draggy should be inserted had it been dropped

ProjectDimensions ( VidkaProj proj ) : System
SecToFrame ( double sec ) : int

Converts seconds to frames

collision_audio ( int x ) : VidkaClipAudio
collision_main ( int x ) : VidkaClipVideoAbstract
collision_mainEases ( int x ) : VidkaClipVideoAbstract
collision_original_all ( int x, int w, IEnumerable clips ) : VidkaClip
collision_original_one ( int x, int w, long totalLengthFrames, long start, long end ) : bool

this returns just the bool because the collision choice is the one clip But calling this prepares the lastCollision_? variables

collision_whatTimeline ( int y, int h ) : ProjectDimensionsTimelineType
convert_AbsX2Frame ( int x ) : long

Converts x-coordinate (absolute) to frame. Used in deltaX --> nFrames conversion

convert_AbsX2Seconds ( int x ) : float
convert_Frame2ScreenX ( long frame ) : int

Converts frame to x-coordinate on screen

convert_Frame2ScreenX_OriginalTimeline ( long frame, long lengthFile, int screenW ) : int

Converts frmae to x-coordinate (on screen!!!) on the original timeline

convert_FrameToAbsX ( long frame ) : int

Converts frame to x-coordinate (absolute)

convert_ScreenX2Frame ( int x ) : long

Converts x-coordinate (on screen!!!) to frame

convert_ScreenX2Frame_OriginalTimeline ( int x, long lengthFile, int screenW ) : long

Converts x-coordinate (on screen!!!) to frame on the original timeline

convert_Sec2ScreenX ( double sec ) : int

Converts second to x-coordinate on screen. Used for draing Axis when fps is not a round int (29.9)

convert_Sec2ScreenX_OriginalTimeline ( double sec, long lengthFile, int screenW ) : int

Converts sec to x-coordinate (on screen!!!) on the original timeline

convert_SecToAbsX ( double sec ) : int

Converts second to x-coordinate (absolute). Used for draing Axis when fps is not a round int (29.9)

getCurrentScrollX ( ) : int

used to grab the new scroll after a zoom operation and set it in the UI

getScreenX1_video ( VidkaClipVideoAbstract vclip ) : int
getTotalWidthPixels ( ) : int
getTotalWidthPixelsForceRecalc ( ) : int
getY_audio1 ( int h ) : int
getY_audio2 ( int h ) : int
getY_main1 ( int h ) : int
getY_main2 ( int h ) : int
getY_main_easing1 ( int h ) : int
getY_main_easing2 ( int h ) : int
getY_main_half ( int h ) : int
getY_original1 ( int h ) : int
getY_original2 ( int h ) : int
getY_original_half ( int h ) : int
getY_timeAxisHeight ( int h ) : int
isEvenOnTheScreen ( long frame, int w ) : bool

just for one point

isEvenOnTheScreen ( long fStart, long fEnd, int w ) : bool

for an actual event with start and finish (in frames)

isFromEastToWest ( long frameStart, long frameEnd, int w ) : bool

the screen is too zoomed-in and neither of the bounds of the clip {} are not within our view [] but the middle is... {----[___]-}

setNewDimensions ( int floatPlayerWidth, int scrollbarWidth ) : void
setProj ( VidkaProj proj ) : void
setScroll ( int x ) : void

Private Methods

Method Description
ZoomIn ( int mouseX, int width ) : void

This changes scrollx and projectWidth

ZoomOut ( int mouseX, int width ) : void

This changes scrollx and projectWidth

calculateCollision_proj ( int x, long frameStart, long frameLength ) : bool

Common collision helper. Calculates collision with objects relative to entire project timeline (as opped to "original" which has its own measure system)

changeZoom ( float factor, int mouseX, int width ) : void

This changes scrollx and projectWidth

init ( ) : void
recalculateProjectWidth ( ) : int

Method Details

FrameToSec() public method

Converts frames to seconds
public FrameToSec ( int frame ) : double
frame int
return double

GetVideoClipDraggyShoveIndex() public method

Returns index of the clip before which the draggy should be inserted had it been dropped
public GetVideoClipDraggyShoveIndex ( Vidka.Core.EditorDraggy draggy ) : int
draggy Vidka.Core.EditorDraggy
return int

ProjectDimensions() public method

public ProjectDimensions ( VidkaProj proj ) : System
proj Vidka.Core.Model.VidkaProj
return System

SecToFrame() public method

Converts seconds to frames
public SecToFrame ( double sec ) : int
sec double
return int

collision_audio() public method

public collision_audio ( int x ) : VidkaClipAudio
x int
return Vidka.Core.Model.VidkaClipAudio

collision_main() public method

public collision_main ( int x ) : VidkaClipVideoAbstract
x int
return Vidka.Core.Model.VidkaClipVideoAbstract

collision_mainEases() public method

public collision_mainEases ( int x ) : VidkaClipVideoAbstract
x int
return Vidka.Core.Model.VidkaClipVideoAbstract

collision_original_all() public method

public collision_original_all ( int x, int w, IEnumerable clips ) : VidkaClip
x int
w int
clips IEnumerable
return Vidka.Core.Model.VidkaClip

collision_original_one() public method

this returns just the bool because the collision choice is the one clip But calling this prepares the lastCollision_? variables
public collision_original_one ( int x, int w, long totalLengthFrames, long start, long end ) : bool
x int
w int
totalLengthFrames long
start long
end long
return bool

collision_whatTimeline() public method

public collision_whatTimeline ( int y, int h ) : ProjectDimensionsTimelineType
y int
h int
return ProjectDimensionsTimelineType

convert_AbsX2Frame() public method

Converts x-coordinate (absolute) to frame. Used in deltaX --> nFrames conversion
public convert_AbsX2Frame ( int x ) : long
x int
return long

convert_AbsX2Seconds() public method

public convert_AbsX2Seconds ( int x ) : float
x int
return float

convert_Frame2ScreenX() public method

Converts frame to x-coordinate on screen
public convert_Frame2ScreenX ( long frame ) : int
frame long
return int

convert_Frame2ScreenX_OriginalTimeline() public method

Converts frmae to x-coordinate (on screen!!!) on the original timeline
public convert_Frame2ScreenX_OriginalTimeline ( long frame, long lengthFile, int screenW ) : int
frame long
lengthFile long
screenW int
return int

convert_FrameToAbsX() public method

Converts frame to x-coordinate (absolute)
public convert_FrameToAbsX ( long frame ) : int
frame long
return int

convert_ScreenX2Frame() public method

Converts x-coordinate (on screen!!!) to frame
public convert_ScreenX2Frame ( int x ) : long
x int
return long

convert_ScreenX2Frame_OriginalTimeline() public method

Converts x-coordinate (on screen!!!) to frame on the original timeline
public convert_ScreenX2Frame_OriginalTimeline ( int x, long lengthFile, int screenW ) : long
x int
lengthFile long
screenW int
return long

convert_Sec2ScreenX() public method

Converts second to x-coordinate on screen. Used for draing Axis when fps is not a round int (29.9)
public convert_Sec2ScreenX ( double sec ) : int
sec double
return int

convert_Sec2ScreenX_OriginalTimeline() public method

Converts sec to x-coordinate (on screen!!!) on the original timeline
public convert_Sec2ScreenX_OriginalTimeline ( double sec, long lengthFile, int screenW ) : int
sec double
lengthFile long
screenW int
return int

convert_SecToAbsX() public method

Converts second to x-coordinate (absolute). Used for draing Axis when fps is not a round int (29.9)
public convert_SecToAbsX ( double sec ) : int
sec double
return int

getCurrentScrollX() public method

used to grab the new scroll after a zoom operation and set it in the UI
public getCurrentScrollX ( ) : int
return int

getScreenX1_video() public method

public getScreenX1_video ( VidkaClipVideoAbstract vclip ) : int
vclip Vidka.Core.Model.VidkaClipVideoAbstract
return int

getTotalWidthPixels() public method

public getTotalWidthPixels ( ) : int
return int

getTotalWidthPixelsForceRecalc() public method

public getTotalWidthPixelsForceRecalc ( ) : int
return int

getY_audio1() public method

public getY_audio1 ( int h ) : int
h int
return int

getY_audio2() public method

public getY_audio2 ( int h ) : int
h int
return int

getY_main1() public method

public getY_main1 ( int h ) : int
h int
return int

getY_main2() public method

public getY_main2 ( int h ) : int
h int
return int

getY_main_easing1() public method

public getY_main_easing1 ( int h ) : int
h int
return int

getY_main_easing2() public method

public getY_main_easing2 ( int h ) : int
h int
return int

getY_main_half() public method

public getY_main_half ( int h ) : int
h int
return int

getY_original1() public method

public getY_original1 ( int h ) : int
h int
return int

getY_original2() public method

public getY_original2 ( int h ) : int
h int
return int

getY_original_half() public method

public getY_original_half ( int h ) : int
h int
return int

getY_timeAxisHeight() public method

public getY_timeAxisHeight ( int h ) : int
h int
return int

isEvenOnTheScreen() public method

just for one point
public isEvenOnTheScreen ( long frame, int w ) : bool
frame long
w int
return bool

isEvenOnTheScreen() public method

for an actual event with start and finish (in frames)
public isEvenOnTheScreen ( long fStart, long fEnd, int w ) : bool
fStart long
fEnd long
w int
return bool

isFromEastToWest() public method

the screen is too zoomed-in and neither of the bounds of the clip {} are not within our view [] but the middle is... {----[___]-}
public isFromEastToWest ( long frameStart, long frameEnd, int w ) : bool
frameStart long
frameEnd long
w int
return bool

setNewDimensions() public method

public setNewDimensions ( int floatPlayerWidth, int scrollbarWidth ) : void
floatPlayerWidth int
scrollbarWidth int
return void

setProj() public method

public setProj ( VidkaProj proj ) : void
proj Vidka.Core.Model.VidkaProj
return void

setScroll() public method

public setScroll ( int x ) : void
x int
return void