Imports System.Drawing
' Nicht gemergte Änderung aus Projekt "Pilz.UI (net8.0-windows)"
' Vor:
' Imports System.Windows.Forms
' Imports Newtonsoft.Json
' Nach:
' Imports System.Windows.Forms
'
' Imports Newtonsoft.Json
Public Class PaintingObjectPaintEventArgs
Inherits EventArgs
'''
''' The Painting Object to draw.
'''
'''
Public ReadOnly Property PaintingObject As PaintingObject
'''
''' The current offset of the page on the screen.
'''
'''
Public ReadOnly Property Offset As PointF
'''
''' The Grpahics from the parent PaintingControl.
'''
'''
Public ReadOnly Property Graphics As Graphics
'''
''' The position of the PaintingObject on Screen.
'''
'''
Public ReadOnly Property Location As PointF
Get
Return New PointF(X, Y)
End Get
End Property
'''
''' The X position of the PaintingObject on Screen.
'''
'''
Public ReadOnly Property X As Single
Get
Return PaintingObject.X - Offset.X
End Get
End Property
'''
''' The Y position of the PaintingObject on Screen.
'''
'''
Public ReadOnly Property Y As Single
Get
Return PaintingObject.Y - Offset.Y
End Get
End Property
'''
''' The rectangle of the PaintingObject on Screen.
'''
'''
Public ReadOnly Property Rectangle As RectangleF
Get
Return New RectangleF(X, Y, PaintingObject.Width, PaintingObject.Height)
End Get
End Property
Friend Sub New(obj As PaintingObject, g As Graphics)
Me.New(obj, g, obj.Parent.Offset)
End Sub
Friend Sub New(obj As PaintingObject, g As Graphics, offset As PointF)
PaintingObject = obj
Me.Offset = offset
Graphics = g
End Sub
End Class