Would native gadget painting interest anyone?

BlitzMax Forums/MaxGUI Module/Would native gadget painting interest anyone?

skn3(Posted 2012) [#1]
Well I spent a day writing a custom gadget painting routine that works with windows and mac (sorry no linux) and was wondering if this would be interesting to anyone?

There would be a bit of work to make it run outside of my codebase so wanted to check before putting the effort in.

The following code produces the proceeding image.

(ignore the CALLBACK stuff, that would be converted to EVENT_GADGETPAINT)



Last edited 2012


JoshK(Posted 2012) [#2]
Does this draw text with subpixel rendering?


jsp(Posted 2012) [#3]
Good idea! Would really save some steps, so please proceed.


skn3(Posted 2012) [#4]
It uses the native text rendering api's so if the platform has it on then yes. Just before end of work I tested it on a legacy gadget I created a year ago. The gadget created a rounded border panel using 4 panel gadgets for the border edges. I was able to convert this to a paintpanel in about 10 minutes and it all worked nicely. Huzzah!

I'll look at porting it next week then.


JoshK(Posted 2012) [#5]
This looks extremely useful. I may use it in some projects. Thank you.


Derron(Posted 2012) [#6]
I would honestly prefer a working wxWidgets implementation (mac win AND linux) - as there is already a possibility included to draw on the canvas of elements (that way I included intellisense-tooltips in scintilla).

I just suggested it as time flows by and maybe time could spend in better ways (except you need it for your editor and are just polishing the implementation).

But as there are free and really powerful solutions (wxWidgets and wxMax - if you are able to compile current versions within 64bit environments, but that's the same with maxgui) I cannot imagine usage if the module costs something (which you did not say).


btw: Function CallbackHook:Int(id:Int,reciever:Object,data:skn3CallbackData) ... English is not my mother tongue but I remember to write that word differently.

bye
Ron


skn3(Posted 2012) [#7]
Lo, I will try and get this added today or tomorrow and will create a git repo for it, or maybe i should add it to maxguiex.. hmm

I would be doing this for free and I think it makes sense to implement something for maxguiex as it would really benefit from having this functionality. I wouldn't be looking to charge for this as I can't really support it officially so maybe the open source route will benefit me in bug testing and tweaks.

oh and thanks for the english lesson haha, my spelling is always good ;D


JoshK(Posted 2012) [#8]
This could be used to make grid controls and other custom gadgets, without the glitches or an OpenGL rendering context.


skn3(Posted 2012) [#9]
It will be interesting to see what people do with this then :D

http://www.blitzbasic.com/Community/posts.php?topic=98957#1159432