Ignore:
Timestamp:
Mar 12, 2008, 9:54:46 PM (16 years ago)
Author:
イグトランス (egtra)
Message:

実験として書いていたControlクラスを追加(せめてコミット前に既存のContorolに混ぜようとしたがコンパイルできなかった)。
ほかForms, Drawing及びGDI+の修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Include/Classes/System/Drawing/Rectangle.ab

    r335 r473  
    11' Classes/System/Drawing/Rectangle.ab
    22
    3 #ifndef __SYSTEM_DRAWING_RECTANGLE_AB__
    4 #define __SYSTEM_DRAWING_RECTANGLE_AB__
    5 
    6 '#require <Classes/System/Math.ab>
    7 #require <Classes/System/Drawing/RectangleF.ab>
    8 #require <Classes/System/Drawing/Point.ab>
    9 #require <Classes/System/Drawing/Size.ab>
     3Namespace System
     4Namespace Drawing
    105
    116Class Rectangle
     
    4035
    4136    Function Location() As Point
    42         Dim pt As Point(x, y)
    43         Return pt
     37        Location = New Point(x, y)
    4438    End Function
    4539
     
    5044
    5145    Function Size() As Size
    52         Dim size As Size(width, height)
     46        Size = New Size(width, height)
    5347    End Function
    5448
     
    5953
    6054    Function X() As Long
    61         Return x
     55        X = x
    6256    End Function
    6357
     
    6761
    6862    Function Y() As Long
    69         Return y
     63        Y = y
    7064    End Function
    7165
     
    7569
    7670    Function Width() As Long
    77         Return width
     71        Width = width
    7872    End Function
    7973
     
    8377
    8478    Function Height() As Long
    85         Return height
     79        Height = height
    8680    End Function
    8781
     
    9185
    9286    Function Left() As Long
    93         Return X
     87        Left = X
    9488    End Function
    9589
    9690    Function Top() As Long
    97         Return Y
     91        Top = Y
    9892    End Function
    9993
    10094    Function Right() As Long
    101         Return X + Width
     95        Right = X + Width
    10296    End Function
    10397
    10498    Function Bottom() As Long
    105         Return Y + Height
     99        Bottom = Y + Height
    106100    End Function
    107101
     
    110104    End Function
    111105
    112     Function Operator == (rc As Rectangle) As Boolean
     106    Function Operator ==(rc As Rectangle) As Boolean
    113107        Return Equals(rc)
    114108    End Function
    115109
    116     Function Operator <> (rc As Rectangle) As Boolean
     110    Function Operator <>(rc As Rectangle) As Boolean
    117111        Return (Not Equals(rc))
    118112    End Function
     
    206200    Static Function Ceiling(rcf As RectangleF) As Rectangle
    207201        Dim r As Rectangle(
    208             System.Math.Ceiling(rcf.X) As Long,
    209             System.Math.Ceiling(rcf.Y) As Long,
    210             System.Math.Ceiling(rcf.Width) As Long,
    211             System.Math.Ceiling(rcf.Height) As Long)
     202            Math.Ceiling(rcf.X) As Long,
     203            Math.Ceiling(rcf.Y) As Long,
     204            Math.Ceiling(rcf.Width) As Long,
     205            Math.Ceiling(rcf.Height) As Long)
    212206        Return r
    213207    End Function
     
    215209    Static Function Round(rcf As RectangleF) As Rectangle
    216210        Dim r As Rectangle(
    217             System.Math.Round(rcf.X) As Long,
    218             System.Math.Round(rcf.Y) As Long,
    219             System.Math.Round(rcf.Width) As Long,
    220             System.Math.Round(rcf.Height) As Long)
     211            Math.Round(rcf.X) As Long,
     212            Math.Round(rcf.Y) As Long,
     213            Math.Round(rcf.Width) As Long,
     214            Math.Round(rcf.Height) As Long)
    221215        Return r
    222216    End Function
     
    224218    Static Function Truncate(rcf As RectangleF) As Rectangle
    225219        Dim r As Rectangle(
    226             System.Math.Truncate(rcf.X) As Long,
    227             System.Math.Truncate(rcf.Y) As Long,
    228             System.Math.Truncate(rcf.Width) As Long,
    229             System.Math.Truncate(rcf.Height) As Long)
     220            Math.Truncate(rcf.X) As Long,
     221            Math.Truncate(rcf.Y) As Long,
     222            Math.Truncate(rcf.Width) As Long,
     223            Math.Truncate(rcf.Height) As Long)
    230224        Return r
    231225    End Function
     
    247241End Class
    248242
    249 #endif '__SYSTEM_DRAWING_RECTFANGLE_AB__
     243End Namespace
     244End Namespace
Note: See TracChangeset for help on using the changeset viewer.