Reflects the selected objects around the horizontal axis.
Syntax: |
---|
DlxSelection.MirrorV() DlxSelection.MirrorV(basePoint) |
Parameters
Parameter | Description |
---|---|
basePoint | A DlxPoint coordinates specifying the base point. |
Return Value
If the operation ends correctly, it returns true otherwise it returns false.
Remarks
If the base point is not specified, the transformation is performed with respect to the selection hotspot. Use the SetHotspot method to set the hotspot of the selection.
Example
Copy code | |
---|---|
var prj = DlxApp.GetJob().GetProject("Example Sch");
if (!prj.IsValid())
prj = DlxApp.GetJob().NewProject("Example Sch");
var doc = prj.GetDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
if (!doc.IsValid())
{
doc = prj.NewDocument("Examples Sch", DlxApp.DOCTYPE_SCHEMATIC);
doc.SetPageFormat("A4", false);
}
if (doc.IsValid() && doc.Activate())
{
var page = doc.GetActivePage();
if (page.IsValid())
{
var layer = page.GetLayerFromType(DlxApp.LAYERTYPE_DRAWING);
if (layer.IsValid())
{
// create objects
var pen = new DlxPenStyle(0.5, new DlxColor("orangered"), "SOLID");
doc.SetStyle(pen);
var obj1 = layer.DrawLine(new DlxPoint(30, 30), new DlxPoint(80, 80));
var rect = new DlxRect(80,80,140,100);
var obj2 = layer.DrawRectangle(rect, 0, 0, 50, 50, 0);
// flip objects
var selection = page.GetSelection();
selection.Empty();
selection.AddObject(obj2);
selection.SetHotspot(new DlxPoint(80,80));
selection.MirrorV();
}
}
}
|