Last change
on this file was 241, checked in by イグトランス (egtra), 18 years ago |
GDI+に対して名前空間で囲ったものの、現在コンパイルできないため分岐させておく
|
File size:
864 bytes
|
Line | |
---|
1 | 'Classes/System/Drawing/SolidBrush.ab
|
---|
2 |
|
---|
3 | #require <GdiplusTypes.ab>
|
---|
4 | #require <Classes/System/Drawing/Brush.ab>
|
---|
5 | #require <Classes/System/Drawing/Color.ab>
|
---|
6 |
|
---|
7 | Class SolidBrush
|
---|
8 | Inherits Brush
|
---|
9 | Public
|
---|
10 | Sub SolidBrush(color As Color)
|
---|
11 | Dim brush = 0 As *Gdiplus.GpSolidFill
|
---|
12 | lastResult = GdiPlus.DllExports.GdipCreateSolidFill(color.Value, brush)
|
---|
13 | SetNativeBrush(brush)
|
---|
14 | End Sub
|
---|
15 |
|
---|
16 | Const Function GetColor(ByRef color As Color) As Gdiplus.Status
|
---|
17 | Dim argb As Gdiplus.ARGB
|
---|
18 | SetStatus(GdiPlus.DllExports.GdipGetSolidFillColor(nativeBrush As *GpSolidFill, argb))
|
---|
19 | color = New Color(argb)
|
---|
20 | Return lastResult
|
---|
21 | End Function
|
---|
22 |
|
---|
23 | Function SetColor(color As Color) As Gdiplus.Status
|
---|
24 | Return SetStatus(GdiPlus.DllExports.GdipSetSolidFillColor(nativeBrush As *GpSolidFill, color.Value))
|
---|
25 | End Function
|
---|
26 |
|
---|
27 | 'Protected
|
---|
28 | Sub SolidBrush()
|
---|
29 | End Sub
|
---|
30 | End Class
|
---|
Note:
See
TracBrowser
for help on using the repository browser.