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

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

File:
1 edited

Legend:

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

    r335 r473  
    11' Classes/System/Drawing/Size.ab
    22
    3 #ifndef __SYSTEM_DRAWING_SIZE_AB__
    4 #define __SYSTEM_DRAWING_SIZE_AB__
    5 
    6 '#include <Classes/System/Math.ab>
    7 #include <Classes/System/Drawing/SizeF.ab>
     3Namespace System
     4Namespace Drawing
    85
    96Class Size
     
    4138
    4239    Function Operator +(sz As Size) As Size
    43         Dim ret As Size(width + sz.width, height + sz.height)
    44         Return ret
     40        Return New Size(width + sz.width, height + sz.height)
    4541    End Function
    4642
    4743    Function Operator -(sz As Size) As Size
    48         Dim ret As Size(width - sz.width, height - sz.height)
    49         Return ret
     44        Return New Size(width - sz.width, height - sz.height)
    5045    End Function
    5146
    5247    Function Operator () As SizeF
    53         Dim szf As SizeF(width, height)
    54         Return szf
     48        Return New SizeF(width, height)
    5549    End Function
    5650
     
    6256        Return Not Equals(sz)
    6357    End Function
    64 /*
    65     Sub Operator =(ByRef sz As Size)
    66         width = sz.width
    67         height = sz.height
    68     End Sub
    69 */
     58
    7059    Function Equals(sz As Size) As Boolean
    7160        If width = sz.width And height = sz.height Then
     
    9382
    9483    Static Function Ceiling(szf As SizeF) As Size
    95         Dim sz As Size(System.Math.Ceiling(szf.Width) As Long, System.Math.Ceiling(szf.Height) As Long)
    96         Return sz
     84        Return New Size(System.Math.Ceiling(szf.Width) As Long, System.Math.Ceiling(szf.Height) As Long)
    9785    End Function
    9886
    9987    Static Function Round(szf As SizeF) As Size
    100         Dim sz As Size(System.Math.Round(szf.Width) As Long, System.Math.Round(szf.Height) As Long)
    101         Return sz
     88        Return New Size(System.Math.Round(szf.Width) As Long, System.Math.Round(szf.Height) As Long)
    10289    End Function
    10390
    10491    Static Function Truncate(szf As SizeF) As Size
    105         Dim sz As Size(System.Math.Truncate(szf.Width) As Long, System.Math.Truncate(szf.Height) As Long)
    106         Return sz
     92        Return New Size(System.Math.Truncate(szf.Width) As Long, System.Math.Truncate(szf.Height) As Long)
    10793    End Function
    10894
     
    11298End Class
    11399
    114 #endif '__SYSTEM_DRAWING_SIZE_AB__
     100End Namespace
     101End Namespace
Note: See TracChangeset for help on using the changeset viewer.