maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   mtPaint 3.20 Revisited (https://talk.maemo.org/showthread.php?t=17712)

Bundyo 2008-03-09 21:20

mtPaint 3.20 Revisited
 
Built mtPaint 3.20 for OS2008 and appears to work fine even with pressure sensitivity and alpha blended brushes. To get these running you need to configure a tablet in preferences (there's one touchscreen there) and also choose the variables. Not hildonized... yet.

3.20-3:

* Default startup image is 770x480x32bit
* Menu key toggles Image View.
* Mapped the D-Pad to show/hide toolbars.

2-nd packaging -

* Fullscreen support.
* Zoom with the hardware keys.

Screenshot:
http://www.bundyo.org/maemo/mtpaint/mtpaint.png

http://www.bundyo.org/maemo/mtpaint/...20-3_armel.deb

EDIT: I noticed a strange problem - when painting the brush suddenly stops until i lift my finger and try again. Can someone confirm that? Its strange since i only touched the toolbars.
That's why i'm leaving the previous version too:
http://www.bundyo.org/maemo/mtpaint/...20-2_armel.deb

Since the diff is getting dusty on the mediafire for the last 1-2 weeks, i might as well post it :)
http://www.mediafire.com/download.php?em4cfwacj2m

I'm doing some Cairo drawing tests right now, may return to mtPaint if i can do something for the fullscreen mode tools.

unique311 2008-03-16 14:42

Re: mtPaint 3.20 Revisited
 
this has been done many times over......
get fullscreen working and you got yourself a deal.....

Bundyo 2008-03-16 14:47

Re: mtPaint 3.20 Revisited
 
:) The previous one was crashing as i understand from what i read.

unique311 2008-03-16 14:51

Re: mtPaint 3.20 Revisited
 
Do you plan to get this hildonized.
If so keep me posted.
Check out mypaint, might be an easier app to hildon.
and it offers alot.

Bundyo 2008-03-16 14:53

Re: mtPaint 3.20 Revisited
 
I plan to adapt it to better suit maemo, but i didn't decide yet how :)

unique311 2008-03-16 14:58

Re: mtPaint 3.20 Revisited
 
get fullscreen going and you are semi-god to me....cool

pipeline 2008-03-16 15:33

Re: mtPaint 3.20 Revisited
 
hardcoding fullscreen is easy if thats all you need, just find where window is created in source code and then call gtk_window_fullscreen( yourwindowvariable );

unique311 2008-03-16 15:41

Re: mtPaint 3.20 Revisited
 
pipeline, I think you need to take a quick look at the sourcecode...
its not that easy.

Bundyo 2008-03-16 16:07

Re: mtPaint 3.20 Revisited
 
Working like a charm. Now let me find the keyboard handler :)

unique311 2008-03-16 16:09

Re: mtPaint 3.20 Revisited
 
will you have a release for me today....
that easy, huh.
feck me..

unique311 2008-03-16 16:09

Re: mtPaint 3.20 Revisited
 
i'm looking at mainwindow.c right now.
and still confused on how to go about it.

pipeline 2008-03-16 16:19

Re: mtPaint 3.20 Revisited
 
if you're able to hook into keyboard handler even better... i think the opposite is gtk_window_unfullscreen( yourwindowvariable) but that requires you can figure out the window var in that event... and you'd have to set up a global toggle var or something

if the window var is kept in some generic datatype then you will need to cast it like
gtk_window_unfullscreen( (GtkWindow *) yourwindowvar);

Bundyo 2008-03-16 16:40

Re: mtPaint 3.20 Revisited
 
Here you are :) I added zoom with the hardware keys since i was passing through there :)

First post updated.

unique311 2008-03-16 16:49

Re: mtPaint 3.20 Revisited
 
unable to install
dependency i think.
libungif4g.



Quote:

Originally Posted by Bundyo (Post 155967)
Here you are :) I added zoom with the hardware keys since i was passing through there :)

First post updated.


NVM.....

Good work on the fullscreen man....
good work.

Bundyo 2008-03-16 16:56

Re: mtPaint 3.20 Revisited
 
I decidedly compiled mtpaint with gif support :) More formats the better... However JPEG 2000 is disabled, if someone wants it - do tell.

pipeline 2008-03-16 16:58

Re: mtPaint 3.20 Revisited
 
works here after red-pill installing that lib... thanks

do you know how to set up icon? lemme know if you want a quick how-to on that

unique311 2008-03-16 17:09

Re: mtPaint 3.20 Revisited
 
pressure sensitivity doesn't seem to work...am i the only one with this issue?

Bundyo 2008-03-16 17:13

Re: mtPaint 3.20 Revisited
 
@pipeline: No problems with the icons, but thanks. :)

@unique: You need to enable rgb and choose a tablet(touchscreen) in settings...

unique311 2008-03-16 17:31

Re: mtPaint 3.20 Revisited
 
can you let me know how you have your touchscreen settings.

device= tsc...... mode= windo.....
x=
y=
pressure=

???

Quote:

Originally Posted by Bundyo (Post 155984)
@pipeline: No problems with the icons, but thanks. :)

@unique: You need to enable rgb and choose a tablet(touchscreen) in settings...


Bundyo 2008-03-16 17:34

Re: mtPaint 3.20 Revisited
 
Seems like since the window is the default - it isn't updating the settings. I tried with screen and it worked. Never touched the other settings, but you can play with them (there's a test area below).

unique311 2008-03-16 17:48

Re: mtPaint 3.20 Revisited
 
screen seems to work, but the pointer seems to want to hug the left side of the screen. Not sure why this is happening. I think the X Y settings is causing this problem.


Test area doesn't work here....btw

Bundyo 2008-03-16 17:58

Re: mtPaint 3.20 Revisited
 
The test area works as to tell you how much you press. Not that it draws anything... ;)

unique311 2008-03-16 18:09

Re: mtPaint 3.20 Revisited
 
ok, got that part.
now with your touchscreen setup...
does the cursor just hug the left side or the top of the canvas.
thats all i'm getting.


Quote:

Originally Posted by Bundyo (Post 156004)
The test area works as to tell you how much you press. Not that it draws anything... ;)


Bundyo 2008-03-16 18:26

Re: mtPaint 3.20 Revisited
 
No, nothing like that...

btw, i think i misguided you about the x, y and pressure - they should be 1, 2, 3 :)

unique311 2008-03-16 18:40

Re: mtPaint 3.20 Revisited
 
My tablet must be scewed then......que cera cera...

the 123 did the trick, but im not too sure about pressure sensitivity working.
Alpha blending works..


but thanks once more for the fullscreen support.
portable cintiq....really nice.

Bundyo 2008-03-16 19:01

Re: mtPaint 3.20 Revisited
 
It may not look like the sensitivity is working, try with the biggest brushes, maybe we don't set the settings right :)

ArnimS 2008-03-16 19:51

Re: mtPaint 3.20 Revisited
 
Thanks bundyo! Runs fine on N810. Not sure about 770 yet (where i had crashes)

I like this best so far out of all the sketch/paint apps... But I couldn't figure out how to get pressure working.

Bundyo 2008-03-16 19:58

Re: mtPaint 3.20 Revisited
 
Yes, it is the smallest and fastest one :) Even has layers, though i don't know if they're of any use :)

BruceL 2008-03-16 19:59

Re: mtPaint 3.20 Revisited
 
Thanks. I've been waiting for this!
My vote: Don't hildonize it. Complex apps become awkward when hildonized.

Bundyo 2008-03-16 20:14

Re: mtPaint 3.20 Revisited
 
I was thinking it will be better to do something like the Photoshop Knock-off theme... Hildonized apps don't have their menu's very handy...

unique311 2008-03-17 04:00

Re: mtPaint 3.20 Revisited
 
I second that motion, don't need to hildon it,
Fullscreen was a great help....much bigger screen to draw on now.
1 suggestion, map the directional keys to removing the toolbars.
such as the
Show Main Toolbar = up
show tools toolbar = down
show settings toolbar = left
show palette = right
>>>>>> Toggle image view = ??? [especially needed, when removed, restarting the device is the only way to bring it back on the n800.] <<<<

Bundyo 2008-03-17 10:31

Re: mtPaint 3.20 Revisited
 
You mean restarting mtpaint :)
Okay, will do.

unique311 2008-03-17 16:04

Re: mtPaint 3.20 Revisited
 
correctumundo..
restarting mtpaint is the only way of bring back the toolbars
after toggle image view is activated.

Quote:

Originally Posted by Bundyo (Post 156303)
You mean restarting mtpaint :)
Okay, will do.


dan 2008-03-17 23:20

Re: mtPaint 3.20 Revisited
 
Nice work. Keep developing it.
Dan

Bundyo 2008-03-17 23:35

Re: mtPaint 3.20 Revisited
 
I'm not developing it ;) I'm just "hacking" it...

unique311 2008-03-18 04:49

Re: mtPaint 3.20 Revisited
 
Are you going to start a garage page for this?
also the code you use for fullscreen, can I take a look?
Will you make the modified source available?
Theres a couple of apps I would like to use in the same
fullscreen mode that you have mtpaint running.
but I know very little about developing,
but like you I like hacking away at source code.
Also notice no lag when painting, How?

Bundyo 2008-03-18 06:18

Re: mtPaint 3.20 Revisited
 
I really want to progress more on this before i set up garage page. Garage page is worthless and confusing if there's nothing or no progress in it :)

The code is nothing special - i think i patched only two files:

Code:

--- dxxorig/mtpaint-3.20.orig/src/mainwindow.c
+++ mtpaint-3.20/src/mainwindow.c
@@ -114,6 +114,8 @@
 int files_passed, file_arg_start, drag_index_vals[2], cursor_corner;
 char **global_argv;
 
+int fullscreen;
+
 GdkGC *dash_gc;
 
 
@@ -816,10 +818,13 @@
 
 static key_action main_keys[] = {
        {"QUIT",        ACT_QUIT, GDK_q, 0, 0},
+        {"TO_FULLSCR",        ACT_FULLSCR, GDK_F6, _CS, 0},
        {"ZOOM_IN",        ACT_ZOOM_IN, GDK_plus, _CS, 0},
        {"",                ACT_ZOOM_IN, GDK_KP_Add, _CS, 0},
+        {"",                ACT_ZOOM_IN, GDK_F7, _CS, 0},
        {"ZOOM_OUT",        ACT_ZOOM_OUT, GDK_minus, _CS, 0},
        {"",                ACT_ZOOM_OUT, GDK_KP_Subtract, _CS, 0},
+        {"",                ACT_ZOOM_OUT, GDK_F8, _CS, 0},
        {"ZOOM_01",        ACT_ZOOM_01, GDK_KP_1, _CS, 0},
        {"",                ACT_ZOOM_01, GDK_1, _CS, 0},
        {"ZOOM_025",        ACT_ZOOM_025, GDK_KP_2, _CS, 0},
@@ -931,8 +936,10 @@
        {"",                ACT_TO_MASK, GDK_4, _CS, _S},
        {"VWZOOM_IN",        ACT_VWZOOM_IN, GDK_plus, _CS, _S},
        {"",                ACT_VWZOOM_IN, GDK_KP_Add, _CS, _S},
+        {"",                ACT_VWZOOM_IN, GDK_F7, _CS, _S},
        {"VWZOOM_OUT",        ACT_VWZOOM_OUT, GDK_minus, _CS, _S},
        {"",                ACT_VWZOOM_OUT, GDK_KP_Subtract, _CS, _S},
+        {"",                ACT_VWZOOM_OUT, GDK_F8, _CS, _S},
        {NULL,                0, 0, 0, 0}
 };
 
@@ -1010,6 +1017,15 @@
 
        switch (action)
        {
+        case ACT_FULLSCR:
+                if (fullscreen == TRUE) {
+                    gtk_window_unfullscreen(GTK_WINDOW(main_window));
+                    fullscreen = FALSE;
+                } else {
+                    gtk_window_fullscreen(GTK_WINDOW(main_window));
+                    fullscreen = TRUE;
+                }
+                return (TRUE);
        case ACT_SEL_LEFT: change = 1;
        case ACT_SEL_2LEFT:
                move_mouse(-change, 0, 0);
@@ -3917,6 +3933,11 @@
 ///        MAIN WINDOW
 
        main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+       
+        fullscreen = TRUE;
+       
+        gtk_window_fullscreen(GTK_WINDOW(main_window));
+       
        gtk_widget_set_usize(main_window, 100, 100);                // Set minimum width/height
        win_restore_pos(main_window, "window", 0, 0, 630, 400);
        gtk_window_set_title (GTK_WINDOW (main_window), VERSION );

Code:

--- dxxorig/mtpaint-3.20.orig/src/mainwindow.h
+++ mtpaint-3.20/src/mainwindow.h
@@ -87,6 +87,7 @@
 #define ACT_TO_MASK        65
 #define ACT_VWZOOM_IN        66
 #define ACT_VWZOOM_OUT        67
+#define ACT_FULLSCR        68
 
 int wtf_pressed(GdkEventKey *event);

Lag?

EDIT: Fixed some warnings.

unique311 2008-03-18 06:25

Re: mtPaint 3.20 Revisited
 
When i compiled it a while back, painting was so smooth.
the bigger the i made the brush the slower it got.
but i don't notice this with yours.

Bundyo 2008-03-18 06:37

Re: mtPaint 3.20 Revisited
 
Dunno, didn't touch anything connected with the painting. Probably a bug that was fixed upstream?

Bundyo 2008-03-18 23:29

Re: mtPaint 3.20 Revisited
 
New version, first post updated.


All times are GMT. The time now is 04:43.

vBulletin® Version 3.8.8