Ejemplo n.º 1
0
        public void Render(Component component, CircuitDiagram.Render.IRenderContext dc, bool absolute)
        {
            Rect drawRect = new System.Windows.Rect(Location.Resolve(component), new Size(Width, Height));
            if (component.IsFlipped == true && component.Orientation == Orientation.Horizontal)
                drawRect = new Rect(drawRect.X - Width, drawRect.Y, Width, Height);
            else if (component.IsFlipped == true && component.Orientation == Orientation.Vertical)
                drawRect = new Rect(drawRect.X, drawRect.Y - Height, Width, Height);

            if (absolute)
                dc.DrawRectangle(Point.Add(drawRect.TopLeft, component.Location), drawRect.Size, StrokeThickness, Fill);
            else
                dc.DrawRectangle(drawRect.TopLeft, drawRect.Size, StrokeThickness, Fill);
        }