[DllImport("user32.dll")]
static extern bool InvertRect(IntPtr hDC, [In] ref RECT lprc);
Public Declare Function InvertRect Lib "user32" Alias "InvertRect" (ByVal hdc As Integer, <MarshalAs(UnmanagedType.Struct)> ByRef lpRect As RECT) As Integer
<StructLayout(LayoutKind.Sequential)> Public Structure RECT
Public Left As Integer
Public Top As Integer
Public Right As Integer
Public Bottom As Integer
End Structure
None.
None.
Please add some!
Public Overrides Sub draw(ByVal g As System.Drawing.Graphics, ByVal gc As GlyphContext)
MyBase.draw(g, gc) '绘原图
'绘制选择的部份
'翻转
If Selection.poStatus <> Selection.EnumSelection.NoSelection Then
Dim hdc As IntPtr = g.GetHdc()
Dim loSelected As RECT
loSelected.Left = Selection.poArea.Left
loSelected.Top = Selection.poArea.Top
loSelected.Right = Selection.poArea.Right
loSelected.Bottom = Selection.poArea.Bottom
InvertRect(hdc.ToInt32, loSelected)
' Release handle to device context.
g.ReleaseHdc(hdc)
End If
End Sub
Please add some!
Do you know one? Please contribute it!