Пример #1
0
 public RectangleF(PointF point, SizeF size)
 {
     m_x = point.X;
     m_y = point.Y;
     m_width = size.Width;
     m_height = size.Height;
 }
Пример #2
0
		protected PointF computeAdjustPosWithAlign()
		{
			PointF ret = new PointF(0, 0);
			int widthStage = 0;
			int heightStage = 0;
            if (m_alignVertial == (int)WindowAnchor.CENTER)
			{
                ret.y = (heightStage - this.m_height) / 2;
			}
            else if (m_alignVertial == (int)WindowAnchor.TOP)
			{
				ret.y = this.m_marginTop;
			}
			else
			{
				ret.y = heightStage - this.m_height - this.m_marginBottom;
			}
			
			if (m_alignHorizontal == (int)WindowAnchor.CENTER)
			{
                ret.x = (widthStage - this.m_width) / 2;
			}
			else if (m_alignHorizontal == (int)WindowAnchor.LEFT)
			{
				ret.x = m_marginLeft;
			}
			else
			{
                ret.x = widthStage - this.m_width - m_marginRight;
			}
			return ret;
		}