flat assembler
Message board for the users of flat assembler.
Index
> IDE Development > Need Color Selector Design |
Author |
|
JohnFound 22 Jun 2011, 16:29
I have to design one for FreshLib as well. But it is not with great priority for me. The problem of the color selector is actually "3D navigation problem". There are many approaches to solve this problem. IMHO the windows selector is not the worst of them.
Several considerations: 1.It is good to have option for manual encoding - if you know what you need. Moreover it is good to support several models: RGB, HSL (HSV) 2. What about alpha-channel? 3. It looks that HSL color model is more "human-centric", so maybe the visual picker is better to be HSV oriented. |
|||
22 Jun 2011, 16:29 |
|
AsmGuru62 22 Jun 2011, 16:57
Thanks.
Manual will be there - user can type values in. I will take a look at HSV design. |
|||
22 Jun 2011, 16:57 |
|
bitshifter 22 Jun 2011, 17:20
The good thing about using the "dated" API color box
is that everyone will be farmilliar with what/how it works. This is good reason to stick with standard API boxes. If you want to mod the box, supply hook when creating it. Then you can tweak it until your heart (or eyes) are content. |
|||
22 Jun 2011, 17:20 |
|
asmhack 23 Jun 2011, 00:28
chill you don't have to design a new color box from the scratch, for an IDE.
Code: fOrMat Pe Gui entry @@entry include 'win32a.inc' section '' import data code writable readable executable library kernel32,'kernel32',comdlg32,'comdlg32' include 'api\kernel32.inc' include 'api\comdlg32.inc' @@entry: mov [cc.lpCustColors],cc.lpCustColors mov [cc.lStructSize],9*4 mov [cc.Flags],$2 ;CC_FULLOPEN invoke ChooseColor,cc ;test eax,eax ;jz cancel invoke ExitProcess,0 struc CHOOSECOLOR { .lStructSize dd $0 .hwndOwner dd $0 .hInstance dd $0 .rgbResult dd $0 ;COLOR .lpCustColors dd $0 .Flags dd $0 .lCustData dd $0 .lpfnHook dd $0 .lpTemplateName dd $0 } cc CHOOSECOLOR who will guess from witch app is the above screnshot.?? |
|||
23 Jun 2011, 00:28 |
|
madmatt 23 Jun 2011, 11:34
Here is a small masm example I converted to fasm that may help you develop your own color picker. Unfortunately, no comments in the code.
|
|||||||||||
23 Jun 2011, 11:34 |
|
AsmGuru62 23 Jun 2011, 13:11
It is more fun to create it than use some other code!
|
|||
23 Jun 2011, 13:11 |
|
JohnFound 23 Jun 2011, 13:25
An idea. As long as in the 1pixel field is very hard to select one particular color, it can be done with "magnifying glass" type navigation. When the cursor enters the 256x256 field zoom window appears under the cursor and the pixels are displayed as a 8x8 squares.
|
|||
23 Jun 2011, 13:25 |
|
AsmGuru62 23 Jun 2011, 17:36
I like that idea!
|
|||
23 Jun 2011, 17:36 |
|
Enko 23 Jun 2011, 23:47
For my abandoned IconEditor project I had to create to custom window controls. One for color picker and the other for the HUE color selection. In the source, there are 3 windows procs. Main windows, the HUE selector and the Color Picker.
|
|||||||||||
23 Jun 2011, 23:47 |
|
AsmGuru62 24 Jun 2011, 13:02
Good stuff, Enko! Thanks.
|
|||
24 Jun 2011, 13:02 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.