[LAD] C/gtk3/cairo meter widget

Patrick Shirkey pshirkey at boosthardware.com
Mon Feb 11 16:58:01 UTC 2013


On Mon, February 11, 2013 10:51 pm, Paul Davis wrote:
> On Sun, Feb 10, 2013 at 11:36 PM, Patrick Shirkey <
> pshirkey at boosthardware.com> wrote:
>
>>
>> On Mon, February 11, 2013 3:21 pm, Paul Davis wrote:
>> > On Sun, Feb 10, 2013 at 11:16 PM, Patrick Shirkey <
>> > pshirkey at boosthardware.com> wrote:
>> >
>> >>
>> >> On Mon, February 11, 2013 9:47 am, Tristan Matthews wrote:
>> >> > 2013/2/10 Patrick Shirkey <pshirkey at boosthardware.com>
>> >>
>> >> > Therè's this one:
>> >> >
>> >>
>> https://github.com/sat-metalab/scenic/blob/master/src/vumeter/vumeter.cpp
>> >> >
>> https://github.com/sat-metalab/scenic/blob/master/src/include/vumeter.h
>> >> >
>> >> > It has only a few c++isms and could easily be purely in C.
>> >> >
>> >>
>> >> Thanks. It does look useful. Seems to be written for gtk2 though.
>> Have
>> >> you
>> >> compiled it with gtk3?
>> >>
>> >
>> > at the very least, it would need a draw() method rather than an
>> expose()
>> > method.
>> >
>> > plus, if i read it correctly it also redraws its entire self (subject
>> to
>> > cairo clipping) on every expose.
>> >
>> > contrast with the the fastmeter in ardour3's libs/gtkmm2ext which
>> draws
>> > only the changed pixels per expose.
>> >
>>
>> I would prefer to use that but it's in pure C++ as well as GTK2 so I
>> have
>> to convert it to c and gtk3 :-(
>>
>>
> well it depends on what you want. tristan's has level markings etc. as
> part
> of the meter widget, and is very close to a pure C widget. mine has a very
> efficient and C-ish drawing method that was created with gtk3 in mind.
>
> its not exactly atypical to find that what you want doesn't exist and you
> have to blend bits and piece.
>

Yeah looks like this is going to have to be done the hard way. The
guitarix code is definitely in cCbut it also use gtk_drawable which means
I have to convert it to cairo for gtk3.

So, I guess I will integrate the cairo code from fastmeter with the
"almost" c code from Tristans while using the guitarix port as a reference
 and trying to maintain the structure of hte original gtkmeter from JAMin
:-)

Oh yeah!


--
Patrick Shirkey
Boost Hardware Ltd


More information about the Linux-audio-dev mailing list