; hgimg3 hgrect bug ; 2023/11/27 ; hgrectで奇数サイズを指定しても偶数サイズにされてしまうバグについて動作確認 ; 14x16, 15x16, 16x16, ... 21x16 で描画してみる。 #include "hgimg3.as" #packopt name "12_hgrect_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 repeat 8 gmode 0 color 1, 1, 1 ; draw rectangle x = wdw_w / 2 y = 80 + (16 + 1) * cnt rot = 0.0 dst_w = 14 + cnt dst_h = 16 hgrect x, y, rot, dst_w, dst_h loop hgsync 15 ; draw end and wait goto *mainloop *job_end hgbye ; release HGIMG3 plugin end