Drawing simple graphics in a panel

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

Eonsv

Draw graphics

Post by Eonsv »

If I were to create a new panel and draw shapes like lines, circles and text in this panel. How would I go about scripting this? I've tried searching google, and this forum (and the wiki) for how to do this, but without luck. Thanks in advance for all helpful answers!
Eonsv

Drawing simple graphics in a panel

Post by Eonsv »

Hello,
I'm making an addon which visualizes some statistics of the current playlist. I Therefore need to draw some graphics in a panel, but I haven't found a way to do this. (I haven't found any information of how to draw graphics with VBScript on the wiki, or with a google search) The statistics I want to visualize are simple things. Things like a chart for how many songs are in each genre, a graph for how the BPM vary with each song (BPM as function of the song's index) etc. Therefore just simple lines and dots (And possibly small circles) are needed, as well as some colouring. I would be very greatful if anyone could point me in the right direction for how to do this.
Last edited by Lowlander on Sun Mar 24, 2013 7:25 pm, edited 1 time in total.
Reason: Merged with existing post
rovingcowboy
Posts: 14163
Joined: Sat Oct 25, 2003 7:57 am
Location: (Texas)
Contact:

Re: Drawing simple graphics in a panel

Post by rovingcowboy »

what your asking is how to make graphs with code and have it show in a window in different color progress bars, that is way intense for programming members here other then maybe the mm developing team and they are busy with making and fixing their mm program
I suggest searching on google where you can find out how to program there for free just by looking for the correct help.

Try using search for drawing with algorithms.
Maybe that will help you.
roving cowboy / keith hall. My skins http://www.mediamonkey.com/forum/viewto ... =9&t=16724 for some help check on Monkey's helpful messages at http://www.mediamonkey.com/forum/viewto ... 4008#44008 MY SYSTEMS.1.Jukebox WinXp pro sp 3 version 3.5 gigabyte mb. 281 GHz amd athlon x2 240 built by me.) 2.WinXP pro sp3, vers 2.5.5 and vers 3.5 backup storage, shuttle 32a mb,734 MHz amd athlon put together by me.) 3.Dell demension, winxp pro sp3, mm3.5 spare jukebox.) 4.WinXp pro sp3, vers 3.5, dad's computer bought from computer store. )5. Samsung Galaxy A51 5G Android ) 6. amd a8-5600 apu 3.60ghz mm version 4 windows 7 pro bought from computer store.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Drawing simple graphics in a panel

Post by trixmoto »

I think within MM the only way probably to do this is with an IE OCX that uses HTML5 and the canvas tag. This would only work if the user has IE9+ installed, but it should give you all the functionality you require.

Or there are graphing tools, such as Google Charts, where you can pass data in and it returns an image that you can then display on the panel - this might make it a lot simplar, as Google is handling all of the drawing, but of course this only works if they provide the functionality that you need.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Eonsv

Re: Drawing simple graphics in a panel

Post by Eonsv »

Thanks for pointing me towards those charts APIs. Google charts is not an option, as it requires the user to be online. However I found another one(flot) which works offline. It works perfectly, but I've no idea how to pass data into it. My first choice was to make a file using the MM app (written in vbscript), which then the javascript html page with the graph would read. But it seems like javascript can't read local files. Do anyone have any ideas to how I can manage to transfer the data from the vbscript app to the javascript html page? (I'm sorry if this is a silly question, as I'm a bit noobish when it comes to this kind of programming. And the Wiki doesn't seem to have an extensive documentation for how the ActiveX object works.)
Thanks in advance! :)
Post Reply