Changeset 684
- Timestamp:
- Mar 9, 2009, 3:13:24 AM (16 years ago)
- 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 3 3 Namespace ActiveBasic 4 4 Namespace Math 5 6 Const PI = _System_PI 7 5 8 '---- 6 9 '浮動小数点数補助 … … 87 90 Dim j = jj >> 5 As Long 88 91 Dim k = (jj And &h0000001f) As Long 89 j = ( j + 511) << 4+ k92 j = ((j + 511) << 4) + k 90 93 SetWord(i, j) 91 94 Dim last As Double -
trunk/ab5.0/ablib/src/basic/prompt.sbp
r635 r684 628 628 'Prompt graphic command functions 629 629 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)630 Sub 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) 631 631 Dim i1 As Long, i2 As Long, i3 As Long, i4 As Long 632 632 … … 646 646 647 647 Dim radi2 As Long 648 Dim iRadius As Long 648 649 If Aspect<1 Then 649 radi2=(CDbl(radius)*Aspect) As Long 650 radi2 = (radius * Aspect) As Long 651 iRadius = radius As Long 650 652 Else 651 radi2 =radius652 radius=(CDbl(radius)/Aspect) As Long653 radi2 = radius As Long 654 iRadius = (radius / Aspect) As Long 653 655 End If 654 656 655 657 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) 658 660 Else 659 661 Dim sw As Boolean 660 StartPos *= StartPos661 EndPos *= EndPos662 StartPos *= 100 663 EndPos *= 100 662 664 663 665 If StartPos<0 Or EndPos<0 Then 664 666 sw = True 667 StartPos = Math.Abs(StartPos) 668 EndPos = Math.Abs(EndPos) 665 669 Else 666 670 sw = False 667 671 End If 668 669 StartPos = Math.Abs(StartPos)670 EndPos = Math.Abs(EndPos)671 672 672 673 If StartPos<=78.5 Then … … 713 714 714 715 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) 717 718 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) 720 721 End If 721 722 End If … … 895 896 */ 896 897 897 Macro LOCATE(x As Long, y As Long)898 ActiveBasic.Prompt.Detail.Locate(x , y)898 Macro LOCATE(x As Double, y As Double) 899 ActiveBasic.Prompt.Detail.Locate(x As Long, y As Long) 899 900 End Macro 900 901 … … 904 905 '------------------- 905 906 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)907 Macro 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) 907 908 '呼び出し方法は以下のようになります(コンパイラがパラメータの並びを最適化します) 908 909 '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) 910 911 End Macro 911 912 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)913 Macro 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) 913 914 '呼び出し方法は以下のようになります(コンパイラがパラメータの並びを最適化します) 914 915 '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) 916 917 End Macro 917 918 918 Macro PSET(x As Long, y As Long)(ColorCode As Long)919 Macro PSET(x As Double, y As Double)(ColorCode As Long) 919 920 '呼び出し方法は以下のようになります(コンパイラがパラメータの並びを最適化します) 920 921 'PSet (x,y),ColorCode 921 ActiveBasic.Prompt.Detail.PSet(x , y, ColorCode)922 ActiveBasic.Prompt.Detail.PSet(x As Long, y As Long, ColorCode) 922 923 End Macro 923 924 924 Macro PAINT(x As Long, y As Long, BrushColor As Long)(ByVal LineColor As Long)925 Macro PAINT(x As Double, y As Double, BrushColor As Long)(ByVal LineColor As Long) 925 926 '呼び出し方法は以下のようになります(コンパイラがパラメータの並びを最適化します) 926 927 '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) 928 929 End Macro 929 930
Note:
See TracChangeset
for help on using the changeset viewer.