簡單函式繪製

2021-06-12 23:38:28 字數 3130 閱讀 2568

今天晚上不想寫作業,發揮電教本色。。。

編輯效果

但是不知道為什麼可執行檔案執行的時候按鈕的字顯示不完全

以下為**

form1:

private sub fanbili_click()

f = 2

p = text4.text

q = text5.text

clsif g = 1 then hge

if g = 2 then hwangge

for i = -4000 to 4000

x = i / bili

if not (x = 0) then

y = p / (q * x)

if abs(y * bili) < 2000 then

me.pset (4200 + i, -int(bili * y) + 2200), vbblack

end if

end if

next i

end sub

private sub erci_click()

f = 1

a = text1.text

b = text2.text

c = text3.text

clsif g = 1 then hge

if g = 2 then hwangge

for i = -4000 to 4000

x = i / bili

y = (a * x + b) * x + c

if abs(y * bili) < 2000 then

me.pset (4200 + i, -int(bili * y) + 2200), vbblack

end if

next i

end sub

private sub jia_click()

bili = bili + 20

if f = 1 then erci_click

if f = 2 then fanbili_click

end sub

private sub jian_click()

bili = bili - 20

if f = 1 then erci_click

if f = 2 then fanbili_click

end sub

private sub ge_click()

g = 1

if f = 1 then erci_click

if f = 2 then fanbili_click

end sub

private sub ge1_click()

g = 1

if f = 1 then erci_click

if f = 2 then fanbili_click

end sub

private sub wangge_click()

g = 2

if f = 1 then erci_click

if f = 2 then fanbili_click

end sub

private sub jiandan_click()

g = 0

if f = 1 then erci_click

if f = 2 then fanbili_click

end sub

private sub form_load()

bili = yuanshibili

end sub

private sub yuanshi_click()

bili = yuanshibili

if f = 1 then erci_click

if f = 2 then fanbili_click

end sub

module1:

public g%

public f%

public bili%

public const yuanshibili = 400

public sub hge()

for j = 1 to int(2000 / bili)

form1.line (4200, 2200 + bili * j)-(4100, 2200 + bili * j), vbred

form1.line (4200, 2200 - bili * j)-(4100, 2200 - bili * j), vbred

next j

for k = 1 to int(4000 / bili)

form1.line (4200 + bili * k, 2200)-(4200 + bili * k, 2300), vbred

form1.line (4200 - bili * k, 2200)-(4200 - bili * k, 2300), vbred

next k

end sub

public sub hwangge()

for j = 1 to int(2000 / bili)

form1.line (200, 2200 + bili * j)-(8200, 2200 + bili * j), vbred

form1.line (200, 2200 - bili * j)-(8200, 2200 - bili * j), vbred

next j

for k = 1 to int(4000 / bili)

form1.line (4200 + bili * k, 200)-(4200 + bili * k, 4200), vbred

form1.line (4200 - bili * k, 200)-(4200 - bili * k, 4200), vbred

next k

end sub

Unity Inspector的簡單繪製

用到的指令碼暫時命名為test customeditor typeof test 重寫oninspectorgui 函式 public class myinspector editor 繼承editor editorguilayout.textfield path 結束橫向布局 guilayout....

GLUT模型繪製函式

void glutwiresphere gldouble radius,glint slices,glint stacks 線框球 void glutsolidsphere gldouble radius,glint slices,glint stacks 實心球 void glutwirecube...

用as函式繪製EMF檔案

感謝老大和濤濤 這稱呼只有老大的老大才叫的,這裡放肆一下,嘿嘿 還有良勝。都是牛人的說.剛要做這個的時候,摸不清下手的點在 連emf檔案,向量繪圖,都不清楚是啥,as的繪圖函式壓根就沒用過,b s模式讀取檔案更是啥都不懂。當時想了兩條方向,要麼在瀏覽器這邊轉格式,要麼在服務端那邊轉完再發過來。根據f...