Пример #1
0
        public Area Dock(Area stBase, Dock cDock)
		{
			Area stRetVal = this;
			if (null != cDock)
			{
				switch (cDock.eCorner)
				{
					case helpers.Dock.Corner.upper_left:
						stRetVal.nLeft = 0;
						stRetVal.nTop = 0;
						break;
					case helpers.Dock.Corner.upper_right:
						stRetVal.nLeft = (short)(stBase.nWidth - nWidth);
						stRetVal.nTop = 0;
						break;
					case helpers.Dock.Corner.bottom_left:
						stRetVal.nLeft = 0;
						stRetVal.nTop = (short)(stBase.nHeight - nHeight);
						break;
					case helpers.Dock.Corner.bottom_right:
						stRetVal.nLeft = (short)(stBase.nWidth - nWidth);
						stRetVal.nTop = (short)(stBase.nHeight - nHeight);
						break;
					case helpers.Dock.Corner.center:
						stRetVal.nLeft = (short)Math.Round((float)stBase.nWidth / 2 - (float)nWidth / 2);
						stRetVal.nTop = (short)Math.Round((float)stBase.nHeight / 2 - (float)nHeight / 2);
						break;
				}
				stRetVal.nLeft += cDock.cOffset.nLeft;
				stRetVal.nTop += cDock.cOffset.nTop;
			}
			return stRetVal;
		}
Пример #2
0
		public EffectVideo()
			: base()
		{
			cDock = new Dock(Dock.Corner.upper_left, new Dock.Offset(0, 0));
			bOpacity = true;
			stArea = Area.stEmpty;
		}
Пример #3
0
		public void DockAccept(Dock cDock)
		{
			Area stAreaNew = Dock(this, cDock);
			nLeft = stAreaNew.nLeft;
			nRight = stAreaNew.nRight;
		}
Пример #4
0
		public void Shift(bool bVertical, float nPosition, Dock.Offset cOffsetAbsolute, float nShiftTotal)
		{
			_bShiftVertical = bVertical;
			_nShiftPosition = nPosition;
			_cShiftOffset = cOffsetAbsolute;
			_nShiftTotal = nShiftTotal;
		}