AuthorTopic: I'm making a paint program, so useful tools, ideas and features required please  (Read 156459 times)

Offline surt

  • 0011
  • **
  • Posts: 570
  • Karma: +0/-0
  • Meat by-product
    • not_surt
    • http://pixeljoint.com/p/2254.htm
    • View Profile
    • Uninhabitant
You might round both the center (or corners) and the radius to half pixel increments in both directions if the zoom factor is 2:1 or bigger (i.e. if these fractions correspond to distinct cursor positions).
For stretch-from-centre ellipse drawing snapping the centre-point to the nearest pixel-centre/pixel-edge in each dimension would be my preferred solution, with a centre-preview-cursor so you don't have to gauge it by eye. I can't see much need for sub-pixel accuracy beyond that in a pixel editor.

happymonster: Questseeker means that you cannot draw an ellipse an even number of pixels wide or high. It only allows odd sizes. I expect this is why ellipses don't work with the grid fit option also.
« Last Edit: December 20, 2008, 10:55:58 am by surt »

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile
Quote from: happymonster, over at RetroRemakes
They don't seem to grasp I'm not a GUI expert programmer
I say that your insistence on writing your own GUI handling (which is not required in order to have a custom look) amounts to a statement 'I am a GUI expert; Or I'm prepared to become one, because I'm going to invest a lot of time in GUI coding' [1]. 
To me, this is a case of actions contradicting words. In my understanding, someone who makes an undertaking like writing their own GUI is either fairly experienced with UI or so inexperienced with GUI that they do not understand the scope of what they are undertaking.


[1] it's not that you'll need to write a lot of code.. but it tends to take a lot of tweaking. Based on the size of GTK+ (26mb total .c + .h files),
you might end up writing 101k .. 406k of GUI code to complete this.
For comparison, Grafx2 does it's own UI and has about 300-400k+ of GUI code, 400-500k+ if you include all the text used in the GUI (statusbar tips, button names, help, etc.).
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline happymonster

  • 0010
  • *
  • Posts: 455
  • Karma: +0/-0
    • View Profile
Thanks Surt I think I understand.

Ai: I tend to be happy to program to solve something if I think I can solve it. With things like using OO gui libraries I just get frustrated very quickly and don't want to continue.
Also, people here do seem to think I can do everything with this program. :P

Offline happymonster

  • 0010
  • *
  • Posts: 455
  • Karma: +0/-0
    • View Profile
I'm trying to work out the best way of doing the palette/palette options. Obviously I only have a limited amount of space so it will probably be some kind of icon tab system where you can select different ways of picking a colour.

That seems the be what other Programs do.

BTW: I've seen several screenshots of GIMP with absolutely massive GUI boxes for tool options, palette's, layers, etc..
And you all had a go at me!!  :huh:

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile
I think I understand the following. Let me explain:

Seriously, a selection function mimicking photoshop would be GOLDEN

Like you could fill a layer with a dither pattern (dither/transparent), then hide it, select it to paint autodither, etc.
Has nothing to do with selection IMO; anyway this is talking about cloning ala clone/stamp tool, AFAICS.

Oh, idea!

* picking a dither pattern off the image, by which I mean the pattern, not the colors; In gimp I can select a rectangle, copy it, and use 'clipboard pattern' to paint with that exact pattern with those exact colors. But what I really want is to paint with that exact pattern with the current FGcolor where the pattern mask is TRUE, and where the pattern mask is FALSE, have no effect (ie treat those pixels as transparent when drawing).

Quote
Or select an area of one single colour and being able to paint in that area after you've started doing it as well. (as opposed to graphics gale's color replacement where you can only work on the colour that is currently on-screen. This function is great as well, though.
This is like stenciling (not the automatic by-color variety, though. the idea is just to be able to make a selection and then painting operations are limited to within the selection.)

Quote
I've seen several screenshots of GIMP with absolutely massive GUI boxes for tool options, palette's, layers, etc
Sure, the thing is that they are strictly optional. In GIMP, it's perfectly possible and pretty easy also, for your toolbox to be just 64 pixels wide. It is true that GIMP has so many dockable dialogs [1] that people tend to go overboard with them.
For example, I have a 'pointer' dialog (which does things similar to your 'I R G B' display, just more comprehensive;
it has two displays so you can see CMYK and RGB values at the same time for example, plus the bounds of the selection mask and the current cursor position.), which I haven't actually used in ages and should get rid of; but, it's docked as a tab and therefore effectively only occupies 32x32 of screen space, so I don't tend to think it is important enough to remove it.

[1] here's a brief list: ToolOptions Layers Channels Paths UndoHistory Brushes BrushEditor Gradients GradientEditor Patterns Colors Palettes PaletteEditor Colormap Tools Pointer SelectionEditor Fonts Buffers Images DocumentHistory DeviceStatus Navigation Templates ErrorConsole Histogram  (total 26 dialogs)

Personally, my toolbox + dockbook put together is wider than Pixe's; 256 pixels wide with a 360x57 gap below the toolbox and a 200x187 gap above the dockbook.
http://img.photobucket.com/albums/v449/neota/sshots/gimpscreenshot.png

Minimum dock width is 240px in Gimp, customizable by theming (I have 200px as my minimum). So yes, you do have GIMP beat in default toolbox size.
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline happymonster

  • 0010
  • *
  • Posts: 455
  • Karma: +0/-0
    • View Profile
That does look like a heavily modified version of GIMP!  :o
Have you actually done your own paint program as well though? Got any screenshots of that? :)

It seems like the dockable / tabbable system seems the best solution to the fact that there is never enough space to have all the options on screen!
It's harder for me because I'm not sure how much space I need for some of the tools (effects, layers, etc..) until they are implemented.

Thanks for the explanations Ai, I think I've got those now..

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile
That does look like a heavily modified version of GIMP!  :o
Hehe, not modified at all, just a different theme and changing the preferences (and running with LANG=eo (Esperanto) internationalization.).
Not one line of code is different. (you should be aware that's GIMP >2.6[1] though)
The default dock configuration is actually smaller than mine, because it has the dockbook attached to the bottom of the toolbox, which
sort of obliges you to have the icons laid out in a tiled rectangle, so there is no 'dead space'
(I prefer my dead space in the corner though, cause the image navigation icon/tool appears there when an image window is behind)
(but GIMP also has the fg/bg indicator there, which is IMO not very useful, so I turned it off)

The rest of the differences are down to the Window Manager I use('awesomeWM'; that is actually it's name.), which has a single bar at the top and no titlebars, X's, or other miscellanea stuck onto windows, just a 1px outline.

[1] by 2.6+ I mean the latest development version, only hours old.

Quote
Have you actually done your own paint program as well though? Got any screenshots of that? :)
Hmm, no. I have done a very modest paint program which fitted in a single C file, intended as a game-embedded graphic editor.
Also a palette editor that was rather well qualified to explain the phrase 'a sledgehammer to crack a walnut' (I haven't seen a palette editor as powerful since, maybe ProMotion palette editor might qualify. It was not very carefully thought out, though; basically everything I could think that might be useful jammed in there with a hamster (I do not joke, there was a bouncing hamster.))


My current approach, as you may have guessed from the design 'doc' I sent you, is centered on my GIMP extension 'GPixMint'.
Once GEGL gets to be nice and fast, I may review the possibility of making my own paint program.
(GEGL is already amazing in a 'the future is already here; it's just not very evenly distributed' sort of way; the amount of cool new technology getting into it is quite amazing, and it's really carefully thought out and good at doing what it does (evaluating graphs of image operations))
For now, the way I can attach new functionality to GIMP via the GPixMint macro system as easy as sneezing, is reasonably sufficient for my needs. I write comprehensive libraries (eg PixLab) for use with Python so my actual macros can be expressed in 2-20 lines each.

Quote
It seems like the dockable / tabbable system seems the best solution to the fact that there is never enough space to have all the options on screen!
It's harder for me because I'm not sure how much space I need for some of the tools (effects, layers, etc..) until they are implemented.
I've heard that 3dsmax's interface uses rollovers -- that is, a dialog turns into a little rectangle which you can rollover to roll out the contents. I don't particularly like that idea.
It also implements panning of GUI via middle-dragging (that is, middle-click+drag), which is very nice indeed (also found in Blender, in which it allows Blender to have an astounding array of options without being rude to the user by taking up too much space.)
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline happymonster

  • 0010
  • *
  • Posts: 455
  • Karma: +0/-0
    • View Profile
I doub't use GIMP myself but it sounds like with your ability with Math that the GIMP plug-in system is the best solution for you in testing out your ideas. :)

Quote
It also implements panning of GUI via middle-dragging (that is, middle-click+drag), which is very nice indeed (also found in Blender, in which it allows Blender to have an astounding array of options without being rude to the user by taking up too much space.)
I thought of doing that myself, or maybe using the mouse scroll wheel in the gui to scroll up and down would be better..

Doing a whole paint program can be pretty intimidating. Especially when you have a lot of ideas that would be useful but are not in other programs (Like yourself and Surt also have). :)

Offline happymonster

  • 0010
  • *
  • Posts: 455
  • Karma: +0/-0
    • View Profile
Right! NEW version up, just in time for Christmas..  ;D

http://www.funkemunke.com/Pixe_Demo.zip

Changes since first release:
  • Implemented new gui style with smaller width and greatly reduced height of dialogs
  • Made mouse wheel scrolling for zooming in/out easier and faster
  • Hopefully made the program start in a window rather than switch fo fullscreen - F7 should still switch between the two modes
  • Corrected (or improved) mouse/draw position at large magnification sizes. This issue is related to gfx card drawing of textures at high magnifications
  • Added start of palette based icons, so user will be able to select colour from different methods, or do palette manipulaton, i.e. copy, swap, ramp, etc..(not fully implemented yet of course)
  • Reorganised grid icons to have No Grid, Lined Grid and Checked grid on left rather than right. This is more consistant with the icons in Box & Ellipse
  • Made the text clear about grid co-ordinates in text dispay for cursor when mouse is over the canvas
  • Added Circle and Diamond brush shapes to the normal Square brush shape
  • Optimised drawing with Square and Diamond brush shapes to be faster
  • * Drawing with a very large Circle brush may be a bit slow as it currently draws a circle for each point..
  • Added brush sizes 1-8 (pixels) as presets with a small slider underneath to select from 1-64 pixels in size
  • Added support for odd and even circles/and ellipses when drawing in stretched mode. Expanded mode still uses old system
  • Circle brushes can now also have an odd or even size
  • Fixed fill so it works properly with grid
  • Made grid be redrawn properly when mask colour (currently 0) is drawn
  • Made brush cursors not be present when drawing filled box/square or ellipse/circle
  • Made mouse stay in one position when panning with middle mouse button held down
  • Fixed a crash when loading BMP images if the image wasn't on a muliple of 32 pixels in width or height



Well, I hope people are finally starting to find it useful.
Merry Christmas!!!!!
« Last Edit: December 21, 2008, 07:00:19 pm by happymonster »

Offline happymonster

  • 0010
  • *
  • Posts: 455
  • Karma: +0/-0
    • View Profile
Oops! Found a few bugs.. now fixed:

Image save bug which sometimes left black areas at edge of image - fixed.
HSV sliders not being updated after dropper used - fixed.

Please re-download if you intend to save images with Pixe.