; hgimg3 hgline bug sample ; hglineで奇数サイズを指定した場合も偶数サイズにされるかどうか動作確認 ; 2023/11/27, use HSP 3.7 beta 7 #include "hgimg3.as" #packopt name "13_hgline_bug" ; file name #packopt type 0 ; generate ".exe" #define KB_ESC $00080 screen 0, 512, 288, 0 ; initialize screen wdw_w = ginfo_winx ; get window size wdw_h = ginfo_winy hgini ; initialize hgimg3 clscolor $4080c0 ; set clear color *mainloop stick k, 0 ; check keyboard if k & KB_ESC : goto *job_end ; ESC key to exit hgdraw ; draw start gmode 0 color 128, 128, 128 hgrect 8, 8, 0.0, 16, 16 repeat 8 gmode 0 color 1, 1, 1 ; draw rectangle x = 0 y = 0 + (2 * cnt) w = cnt hgline x + w, y, x, y loop hgsync 15 ; draw end and wait goto *mainloop *job_end hgbye ; release HGIMG3 plugin end