本文整理汇总了C#中Rectangle2D.GetX方法的典型用法代码示例。如果您正苦于以下问题:C# Rectangle2D.GetX方法的具体用法?C# Rectangle2D.GetX怎么用?C# Rectangle2D.GetX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rectangle2D
的用法示例。
在下文中一共展示了Rectangle2D.GetX方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: transform
/**
* Auto-shapes are defined in the [0,21600] coordinate system.
* We need to transform it into normal slide coordinates
*
*/
public static java.awt.Shape transform(java.awt.Shape outline, Rectangle2D anchor){
AffineTransform at = new AffineTransform();
at.translate(anchor.GetX(), anchor.GetY());
at.scale(
1.0f/21600*anchor.Width,
1.0f/21600*anchor.Height
);
return at.CreateTransformedShape(outline);
}
示例2: SetCoordinates
/**
* Sets the coordinate space of this group. All children are constrained
* to these coordinates.
*
* @param anchor the coordinate space of this group
*/
public void SetCoordinates(Rectangle2D anchor){
EscherContainerRecord spContainer = (EscherContainerRecord)_escherContainer.GetChild(0);
EscherSpgrRecord spgr = (EscherSpgrRecord)getEscherChild(spContainer, EscherSpgrRecord.RECORD_ID);
int x1 = (int)Math.round(anchor.GetX()*MASTER_DPI/POINT_DPI);
int y1 = (int)Math.round(anchor.GetY()*MASTER_DPI/POINT_DPI);
int x2 = (int)Math.round((anchor.GetX() + anchor.Width)*MASTER_DPI/POINT_DPI);
int y2 = (int)Math.round((anchor.GetY() + anchor.Height)*MASTER_DPI/POINT_DPI);
spgr.SetRectX1(x1);
spgr.SetRectY1(y1);
spgr.SetRectX2(x2);
spgr.SetRectY2(y2);
}