Ignore:
Timestamp:
Apr 2, 2009, 5:27:22 PM (15 years ago)
Author:
イグトランス (egtra)
Message:

BrushとStringFormatを追加
(#241)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/TestCase/UI_Sample/step32_AnalogWatch_Gdiplus.ab

    r698 r701  
    1313#require <Classes/System/Drawing/FontFamily.ab>
    1414#require <Classes/System/Drawing/Pen.ab>
     15#require <Classes/System/Drawing/Brush.ab>
     16#require <Classes/System/Drawing/StringFormat.ab>
     17#require <Classes/System/Drawing/Image.ab>
    1518#require <Classes/System/Drawing/Drawing2D/misc.ab>
    1619#require <Classes/System/Drawing/Drawing2D/Matrix.ab>
     
    3639Imports ActiveBasic.Math
    3740Imports System
     41Imports System.Drawing
     42Imports System.Drawing.Drawing2D
    3843
    3944#resource "UI_Sample.rc"
     
    7681
    7782    Sub OnDestroy(sender As Object, e As EventArgs)
    78 '       GdiplusShutdown(gdipToken)
     83        GdiplusShutdown(gdipToken)
    7984    End Sub
    8085
     
    96101
    97102    Sub OnPaint_(sender As Object, e As PaintDCArgs)
    98         Imports System.Drawing
    99 
    100103        Dim pos As PointF
    101104
     
    136139        g.DrawLine(pen, CenterPos, pos)
    137140        pen.Dispose()
     141
     142        Dim pt1 = [0, 0] As Point
     143        Dim pt2 As Point
     144        pt2.X = rc.right
     145        pt2.Y = rc.bottom
     146        Dim br = New LinearGradientBrush(pt1, pt2, &haa00ff40 As Color, &h66ffcc00 As Color) 'New SolidBrush(&h8080ff00)
     147        br.GammaCorrection = True
     148        Dim f = New Font("Verdana", 20.0)
     149        Dim s = "Step32. Analog whach" As String
     150        g.RotateTransform(25)
     151        g.DrawString(s, f, br, 10.0, 10.0)
     152        f.Dispose()
     153        br.Dispose()
     154
    138155        g.Dispose()
    139156    End Sub
Note: See TracChangeset for help on using the changeset viewer.