Changeset 684


Ignore:
Timestamp:
Mar 9, 2009, 3:13:24 AM (16 years ago)
Author:
イグトランス (egtra)
Message:

Circle, Sqrtを壊していたので修正。プロンプト画面の描画ステートメントの座標の引数をDoubleへ変更。

Location:
trunk/ab5.0/ablib/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/ablib/src/Classes/ActiveBasic/Math/Math.ab

    r589 r684  
    33Namespace ActiveBasic
    44Namespace Math
     5
     6Const PI = _System_PI
     7
    58'----
    69'浮動小数点数補助
     
    8790            Dim j = jj >> 5 As Long
    8891            Dim k = (jj And &h0000001f) As Long
    89             j = (j + 511) << 4 + k
     92            j = ((j + 511) << 4) + k
    9093            SetWord(i, j)
    9194            Dim last As Double
  • trunk/ab5.0/ablib/src/basic/prompt.sbp

    r635 r684  
    628628'Prompt graphic command functions
    629629
    630 Sub Circle(x As Long , y As Long, radius As Long, ColorCode As Long, StartPos As Double, EndPos As Double, Aspect As Double, bFill As Long, BrushColor As Long)
     630Sub Circle(x As Long , y As Long, radius As Double, ColorCode As Long, StartPos As Double, EndPos As Double, Aspect As Double, bFill As Long, BrushColor As Long)
    631631    Dim i1 As Long, i2 As Long, i3 As Long, i4 As Long
    632632
     
    646646
    647647    Dim radi2 As Long
     648    Dim iRadius As Long
    648649    If Aspect<1 Then
    649         radi2=(CDbl(radius)*Aspect) As Long
     650        radi2 = (radius * Aspect) As Long
     651        iRadius = radius As Long
    650652    Else
    651         radi2=radius
    652         radius=(CDbl(radius)/Aspect) As Long
     653        radi2 = radius As Long
     654        iRadius = (radius / Aspect) As Long
    653655    End If
    654656
    655657    If StartPos=0 And EndPos=0 Then
    656         Ellipse(hDC,x-radius,y-radi2,x+radius,y+radi2)
    657         Ellipse(_PromptSys_hMemDC,x-radius,y-radi2,x+radius,y+radi2)
     658        Ellipse(hDC,x-iRadius,y-radi2,x+iRadius,y+radi2)
     659        Ellipse(_PromptSys_hMemDC,x-iRadius,y-radi2,x+iRadius,y+radi2)
    658660    Else
    659661        Dim sw As Boolean
    660         StartPos *=StartPos
    661         EndPos *=EndPos
     662        StartPos *= 100
     663        EndPos *= 100
    662664
    663665        If StartPos<0 Or EndPos<0 Then
    664666            sw = True
     667            StartPos = Math.Abs(StartPos)
     668            EndPos = Math.Abs(EndPos)
    665669        Else
    666670            sw = False
    667671        End If
    668 
    669         StartPos = Math.Abs(StartPos)
    670         EndPos = Math.Abs(EndPos)
    671672
    672673        If StartPos<=78.5 Then
     
    713714
    714715        If sw Then
    715             Pie(hDC,x-radius,y-radi2,x+radius,y+radi2, x+i1,y-i2,x+i3,y-i4)
    716             Pie(_PromptSys_hMemDC,x-radius,y-radi2,x+radius,y+radi2, x+i1,y-i2,x+i3,y-i4)
     716            Pie(hDC,x-iRadius,y-radi2,x+iRadius,y+radi2, x+i1,y-i2,x+i3,y-i4)
     717            Pie(_PromptSys_hMemDC,x-iRadius,y-radi2,x+iRadius,y+radi2, x+i1,y-i2,x+i3,y-i4)
    717718        Else
    718             Arc(hDC,x-radius,y-radi2,x+radius,y+radi2, x+i1,y-i2,x+i3,y-i4)
    719             Arc(_PromptSys_hMemDC,x-radius,y-radi2,x+radius,y+radi2, x+i1,y-i2,x+i3,y-i4)
     719            Arc(hDC,x-iRadius,y-radi2,x+iRadius,y+radi2, x+i1,y-i2,x+i3,y-i4)
     720            Arc(_PromptSys_hMemDC,x-iRadius,y-radi2,x+iRadius,y+radi2, x+i1,y-i2,x+i3,y-i4)
    720721        End If
    721722    End If
     
    895896*/
    896897
    897 Macro LOCATE(x As Long, y As Long)
    898     ActiveBasic.Prompt.Detail.Locate(x, y)
     898Macro LOCATE(x As Double, y As Double)
     899    ActiveBasic.Prompt.Detail.Locate(x As Long, y As Long)
    899900End Macro
    900901
     
    904905'-------------------
    905906
    906 Macro CIRCLE(x As Long , y As Long, radius As Long)(ColorCode As Long, StartPos As Double, EndPos As Double, Aspect As Double, bFill As Long, BrushColor As Long)
     907Macro CIRCLE(x As Double , y As Double, radius As Double)(ColorCode As Long, StartPos As Double, EndPos As Double, Aspect As Double, bFill As Long, BrushColor As Long)
    907908    '呼び出し方法は以下のようになります(コンパイラがパラメータの並びを最適化します)
    908909    'Circle (x, y), radius [, color] [, start] [, end] [, aspect] [, f] [, color2]
    909     ActiveBasic.Prompt.Detail.Circle(x, y, radius, ColorCode, StartPos, EndPos, Aspect, bFill, BrushColor)
     910    ActiveBasic.Prompt.Detail.Circle(x As Long, y As Long, radius, ColorCode, StartPos, EndPos, Aspect, bFill, BrushColor)
    910911End Macro
    911912
    912 Macro LINE(sx As Long, sy As Long, bStep As Long, ex As Long, ey As Long)(ColorCode As Long, fType As Long, BrushColor As Long)
     913Macro LINE(sx As Double, sy As Double, bStep As Long, ex As Double, ey As Double)(ColorCode As Long, fType As Long, BrushColor As Long)
    913914    '呼び出し方法は以下のようになります(コンパイラがパラメータの並びを最適化します)
    914915    'Line (sx,sy)-[STEP](ex,ey),[ColorCode],[B/Bf],[BrushColor]
    915     ActiveBasic.Prompt.Detail.Line(sx, sy, bStep, ex, ey, ColorCode, fType, BrushColor)
     916    ActiveBasic.Prompt.Detail.Line(sx As Long, sy As Long, bStep, ex As Long, ey As Long, ColorCode, fType, BrushColor)
    916917End Macro
    917918
    918 Macro PSET(x As Long, y As Long)(ColorCode As Long)
     919Macro PSET(x As Double, y As Double)(ColorCode As Long)
    919920    '呼び出し方法は以下のようになります(コンパイラがパラメータの並びを最適化します)
    920921    'PSet (x,y),ColorCode
    921     ActiveBasic.Prompt.Detail.PSet(x, y, ColorCode)
     922    ActiveBasic.Prompt.Detail.PSet(x As Long, y As Long, ColorCode)
    922923End Macro
    923924
    924 Macro PAINT(x As Long, y As Long, BrushColor As Long)(ByVal LineColor As Long)
     925Macro PAINT(x As Double, y As Double, BrushColor As Long)(ByVal LineColor As Long)
    925926    '呼び出し方法は以下のようになります(コンパイラがパラメータの並びを最適化します)
    926927    'Paint (x,y),BrushColor,LineColor
    927     ActiveBasic.Prompt.Detail.Paint(x, y, BrushColor, LineColor)
     928    ActiveBasic.Prompt.Detail.Paint(x As Long, y As Long, BrushColor, LineColor)
    928929End Macro
    929930
Note: See TracChangeset for help on using the changeset viewer.