I don't think that creating 256 buttons for the colors is the best solution.
I think it is better to draw the colors on the form and then you can use GetPixel to get the color value.
I don't think that creating 256 buttons for the colors is the best solution.
Neither do I, especially after seeing how long it took to place 1024 in a 32x32 grid
My idea was to have 48 buttons at the bottom of the screen that show a range of colour in a set band i.e. reds, yellows, blues and greens etc, selected by a tab like control.
I have to admit that I'm learning by trial and error, and this seems to be particularly challenging.
I'm sure that my original suggestion of a calculator would have been far easier
I'll PM you my code so that you can see what I'm on with. At the moment there isn't very much as I'm trying to keep it as compact as I can. It's also been done on the device and so as usual I'm finding that it doesn't display or work exactly the same on the desktop. The grid is slightly out of position to the pen marks and I'm using a MouseMove event, which on the Device works perfectly, but on the desktop it causes the pen to draw even when not holding the mouse button down.
Regards,
RandomCoder
__________________
"Defeat never comes to any man until he admits it."Josephus Daniels
After further investigation it would appear that I don't actually need to use a 'standard' palette since the colours are stored within the Icon file, and presumably any no-standard colours will be replaced by the closest device colour.
Is their anyone else attempting their own icon editor
I haven't even got to the reading/writing to file stuff yet and am already struggling
Regards,
RandomCoder
__________________
"Defeat never comes to any man until he admits it."Josephus Daniels
Well, I started mine, using the "picturebox as a pixel" aproach, wich is quite slow even if we use the IDE to place the controls....To Ease things up a bit I created an "control array creator" in wich I placed the nr of row and colums and the size of the control and gap between controls, and the "addcontrol" was added to a file in IDE format, so I just neede to copy its content to the project sbp file using a text editor....
For the colors I was planning on using a 3 slider solucion, and after a quick search, i founsd out that a 256 palette is a "normal" palette but with a 51 (or 52, not sure)bit separation of colors, so should be too hard to implement...
As you say, an ico file also stores the color palette, but when creating a new icon, there iss no color palette defined, so keep that aalso in mind, you will need to generate the palette...
Unfortunatly, and thankfully, due to my new job ( ) I now don't have as much free time as I did...So probably won't be able to enter the compettition...
Maybe the next one....
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate) B4PPC DLL Version Listing - B4Android DLL Version Listing
The competion Idea is a great one...
But perhaps we started a too big project for us...???
Still I'm up for the chalange And would like to see some question answered before start (Have we started already??).
WIch platform to target:
Device only, Desktop only, Both?
Icon sizes:
16x16, 32x32 and 64x64?
256 colors only palette?
File types:
ico and dll, or just ico?
What primall funcions?
Load, save?
What grafical primall funcions.
pixel, line, elispe,fill, erase....
DLL's
Use them or not?
Please create a fixed must have funcions before start, in order to set the dificulty to equal levels to every-one....
As someone posted, if it works, it's a winner...
And Please do set a start date and a finish date...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate) B4PPC DLL Version Listing - B4Android DLL Version Listing
To be honest I classed the posting of this thread as the start of the challenge (note that I used the word challenge instead of competition because I think most of us will find this so challenging that we'll just be glad to get something working irrespective of the competition )
But to answer your questions and put as much 'meat on the bone' as possible...
Target is both the desktop and device, although the device is more favourable as it was a question relating to icon editors on the device that started all of this off.
Icon Sizes 16x16 and 32x32 only with up to 256 colours.
File type, must be .ico but if you can work out how to include .dll or .exe then these can also be included.
The primal functions I had in mind were, create new, load, edit, save and saveas.
Graphical functions... As many as you like - I didn't realise how hard it was to create many of these and at present only have a simple pen option but hope to expand on this.
Dll's, why not although this could be deemed as an unfair advantage but if you have the know how them why not use it
The difficulty I think is set high enough just trying to get something that will work. The more features you want to add the harder it obviously gets.
I'm sure that once you get started you'll soon discover just how tricky this application really is. I was struggling just to get a grid to create the icon on and then to extract the design from.
Start date is NOW... End date is end of September (If that's OK with everyone else - although I think that there's only myself that's actually having a go at it, but Erel has suggested that he may come up with something )
Regards,
RandomCoder
__________________
"Defeat never comes to any man until he admits it."Josephus Daniels
I found this litle dll that maybe can help in your/our quest for an icon editor...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate) B4PPC DLL Version Listing - B4Android DLL Version Listing
I found this litle dll that maybe can help in your/our quest for an icon editor...
Thanks CableGuy,
Unfortunately I don't have any VB software and so cannot view the files. I've been keeping track of your own dll development and I have to say that its all a little over my head. Maybe one day I might try to understand dll creation and the syntax, but for now I'm more than happy playing with B4PPC.
PS this challenge is really tough, I'm not particularly making much headway with it.
__________________
"Defeat never comes to any man until he admits it."Josephus Daniels
Inside the zip bin's folder there's a compiled dll that can be used as a normal dll for basic4ppc....
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate) B4PPC DLL Version Listing - B4Android DLL Version Listing
In one of the other threads I've already said that my icon editor is pretty pathetic, but here is the proof. (I'm not sure that I can actually call it an icon editor as all it is at the moment is a designer.)
I must apologise for not completing it further, today I have been to court to fight for the right to see my children and so have been very busy in the run up to this and it's been weighing heavy on my mind.
Why did I set such a difficult task
Maybe if I get the opportunity I will add some file handling.
Regards,
RandomCoder
__________________
"Defeat never comes to any man until he admits it."Josephus Daniels