public IsOutlineVisible ( int x, int y, Pen pen ) : bool | ||
x | int | |
y | int | |
pen | Pen | |
Résultat | bool |
public bool IsOutlineVisible(int x, int y, Pen pen)
{
return IsOutlineVisible (new Point(x,y), pen, null);
}
GraphicsPath::IsOutlineVisible ( Point point, Pen pen ) : bool | |
GraphicsPath::IsOutlineVisible ( Point pt, Pen pen, Graphics graphics ) : bool | |
GraphicsPath::IsOutlineVisible ( PointF point, Pen pen ) : bool | |
GraphicsPath::IsOutlineVisible ( PointF pt, Pen pen, Graphics graphics ) : bool | |
GraphicsPath::IsOutlineVisible ( float x, float y, Pen pen ) : bool | |
GraphicsPath::IsOutlineVisible ( float x, float y, Pen pen, Graphics graphics ) : bool | |
GraphicsPath::IsOutlineVisible ( int x, int y, Pen pen, Graphics graphics ) : bool |
public override bool ClickableAt(int x, int y) { Rectangle rect = GuiRectangle.GetGuiRectangle(Left, Top, Width, Height); int lineThickness = GetFieldValueAsInt(FieldType.LINE_THICKNESS) + 10; Color fillColor = GetFieldValueAsColor(FieldType.FILL_COLOR); // If we clicked inside the rectangle and it's visible we are clickable at. if (!Color.Transparent.Equals(fillColor)) { if (Contains(x, y)) { return true; } } // check the rest of the lines if (lineThickness > 0) { using (Pen pen = new Pen(Color.White, lineThickness)) { using (GraphicsPath path = new GraphicsPath()) { path.AddEllipse(rect); return path.IsOutlineVisible(x, y, pen); } } } else { return false; } }