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/Font.ab

    r212 r473  
    1 #ifndef _GDIPLUSFONT_H
    2 #define _GDIPLUSFONT_H
    3 
    4 #require <GdiPlus.ab>
    5 #require <Classes/System/Drawing/misc.ab>
     1/**
     2@file Classes/System/Drawing/Font.ab
     3@brief Fontクラスなどの実装。
     4*/
     5
    66#require <Classes/System/Drawing/Graphics.ab>
    77
     
    1010
    1111Class Font
     12    Implements System.IDisposable
    1213Public
    1314'    friend class Graphics
     
    130131        /*IN*/ style As Long, /*IN*/ unit As GraphicsUnit,
    131132        /*IN const*/ fontCollection As FontCollection)
    132 #ifdef __STRING_IS_NOT_UNICODE
    133         Dim oldAlloc = _System_AllocForConvertedString
    134         _System_AllocForConvertedString = AddressOf (_System_malloc)
    135         Dim name = ToWCStr(familyName)
    136         Font(name, emSize, style, unit, fontCollection)
    137         _System_free(name)
    138         _System_AllocForConvertedString = oldAlloc
    139 #else
    140         Font(familyName.Chars, emSize, style, unit, fontCollection)
    141 #endif
     133        Font(ToWCStr(familyName), emSize, style, unit, fontCollection)
    142134    End Sub
    143135
    144136    Const Function GetLogFontA(/*IN const*/ g As Graphics, /*OUT*/ ByRef lf As LOGFONTA) As Status
    145137        Dim nativeGraphics As *GpGraphics
    146         If VarPtr(g) <> 0 Then
     138        If Not ActiveBasic.IsNothing(g) Then
    147139            nativeGraphics = g.nativeGraphics
    148140        End If
     
    152144    Const Function GetLogFontW(/*IN const*/ g As Graphics, /*OUT*/ ByRef lf As LOGFONTW) As Status
    153145        Dim nativeGraphics As *GpGraphics
    154         If VarPtr(g) <> 0 Then
     146        If Not ActiveBasic.IsNothing(g) Then
    155147            nativeGraphics = g.nativeGraphics
    156148        End If
     
    160152    Const Function GetLogFont(/*IN const*/ g As Graphics, /*OUT*/ ByRef lf As LOGFONT) As Status
    161153        Dim nativeGraphics As *GpGraphics
    162         If VarPtr(g) <> 0 Then
     154        If Not ActiveBasic.IsNothing(g) Then
    163155            nativeGraphics = g.nativeGraphics
    164156        End If
     
    212204    Const Function GetHeight(/*IN const*/ g As Graphics) As Single
    213205        Dim nativeGraphics As *GpGraphics
    214         If VarPtr(g) <> 0 Then
     206        If Not ActiveBasic.IsNothing(g) Then
    215207            nativeGraphics = g.NativeGraphics
    216208        End If
     
    270262    'Const Function SizeInPoint() As Boolean
    271263
    272     Const Function NativeFont() As *GpFont
    273         Return nativeFont
    274     End Function
    275 
    276264    Const Function StrikeOut() As Boolean
    277265        Dim lf As LOGFONT
     
    341329    /*mutable*/ lastResult As Status
    342330End Class
    343 
    344 #endif
Note: See TracChangeset for help on using the changeset viewer.