rhett-lee / nim_duilib

duilib界面库的改进版,支持Windows/Linux平台(基于SDL3),支持Skia渲染引擎(支持CPU/GPU),支持DPI感知,多语言动态切换,支持SVG,PNG,GIF,JPG,BMP,APNG,WEBP,ICO图片,支持GIF/WebP/APNG动画。
MIT License
69 stars 15 forks source link

the program crashes when the color picker window resizing #29

Closed mandomwu closed 3 months ago

mandomwu commented 3 months ago

1.Problem Description In the debug mode of the example controls, the program crashes when the color picker window is dragged to a very small size.

2.Bug causes and modification suggestions In the HSV_SAT_INIT_0 and HSV_SAT_INIT_1 macros in the ColorConvert.cpp file, when j is equal to 1, the dividend is 0, which causes a program exception. It is recommended to modify the macro: #define HSV_LOOP_STEPS(w) (w) - 1 to #define HSV_LOOP_STEPS(w) ((w) != 1 ? (w) - 1 : 0.0001) Change 0.0001 to a suitable default value.

rhett-lee commented 3 months ago

这个缺陷已经修复了,可以更新下最新代码试试。