[longomatch] Change cliping behaviour for cameras and periods
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Change cliping behaviour for cameras and periods
- Date: Fri, 24 Apr 2015 11:12:17 +0000 (UTC)
commit 17b6028505ab7aa1741be1dbedd70c6357c9329c
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Thu Apr 23 18:47:18 2015 +0200
Change cliping behaviour for cameras and periods
.../CanvasObjects/Timeline/CameraObject.cs | 1 +
.../CanvasObjects/Timeline/TimeNodeObject.cs | 18 ++++++++++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/LongoMatch.Drawing/CanvasObjects/Timeline/CameraObject.cs
b/LongoMatch.Drawing/CanvasObjects/Timeline/CameraObject.cs
index 182ce5f..8f22cd9 100644
--- a/LongoMatch.Drawing/CanvasObjects/Timeline/CameraObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Timeline/CameraObject.cs
@@ -35,6 +35,7 @@ namespace LongoMatch.Drawing.CanvasObjects.Timeline
// Video boundaries can't be changed, only the segment can move.
DraggingMode = NodeDraggingMode.Segment;
SelectionMode = NodeSelectionMode.Segment;
+ StrictClipping = false;
}
public MediaFile MediaFile {
diff --git a/LongoMatch.Drawing/CanvasObjects/Timeline/TimeNodeObject.cs
b/LongoMatch.Drawing/CanvasObjects/Timeline/TimeNodeObject.cs
index d7ba80c..d4f415d 100644
--- a/LongoMatch.Drawing/CanvasObjects/Timeline/TimeNodeObject.cs
+++ b/LongoMatch.Drawing/CanvasObjects/Timeline/TimeNodeObject.cs
@@ -37,6 +37,7 @@ namespace LongoMatch.Drawing.CanvasObjects.Timeline
DraggingMode = NodeDraggingMode.All;
LineColor = Config.Style.PaletteBackgroundLight;
Height = StyleConf.TimelineCategoryHeight;
+ StrictClipping = true;
}
protected override void Dispose (bool disposing)
@@ -116,6 +117,11 @@ namespace LongoMatch.Drawing.CanvasObjects.Timeline
}
}
+ protected bool StrictClipping {
+ get;
+ set;
+ }
+
Area Area {
get {
double ls = StyleConf.TimelineLineSize;
@@ -197,9 +203,17 @@ namespace LongoMatch.Drawing.CanvasObjects.Timeline
}
break;
case SelectionPosition.All:
+ Time tstart, tstop;
Time diff = Utils.PosToTime (new Point (diffX, p.Y), SecondsPerPixel);
- if ((TimeNode.Start + diff) >= new Time (0) &&
- (TimeNode.Start + diff) < MaxTime) {
+
+ if (StrictClipping) {
+ tstart = TimeNode.Start;
+ tstop = TimeNode.Stop;
+ } else {
+ tstart = TimeNode.Stop;
+ tstop = TimeNode.Start;
+ }
+ if ((tstart + diff) >= new Time (0) && (tstop + diff) < MaxTime) {
TimeNode.Start += diff;
TimeNode.Stop += diff;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]