[Sugar-devel] Need Help with Drag and Drop in Gtk.Drawingarea

Dave Crossland dave at lab6.com
Thu Jun 16 16:33:33 EDT 2016


On 16 June 2016 at 12:35, Yash Agarwal <agrwal.ysh94 at gmail.com> wrote:

> On Thu, Jun 16, 2016 at 7:01 PM Dave Crossland <dave at lab6.com> wrote:
>
>> 1. How does TruFont do it?
>>
>
> Trufont used PyQt's inbuilt features to create widgets any where on the
> screen
> Gtk also has something like this but I'm yet to figure it out
>
> 2. Do any other Activities have bezier vector drawing?
>>
>
> I don't know of any,
>
> 3. Are there any example of bezier vector drawing on the web?
>>
>
> bezier curvers are not the issue here, I need a way to make buttons of the
> shape of small circular shapes to be displayed over a Gtk.Drawing area
>

I think perhaps the smallest font editor codebase I know of is Raph
Levien's old (GTK v1) "ppedit" editor, which (I think) does this by having
a draw_dots() method:

http://cd8ba0b44a15c10065fd-24461f391e20b7336331d5789078af53.r23.cf1.rackcdn.com/typeboard.vanillaforums.com/editor/4y/ujtkahwkzbir.gif

http://levien.com/garden/ppedit/ppedit_gtk1.c

There's an example of drawing a circle here:
http://zetcode.com/gfx/pycairo/basicdrawing/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160616/be463ffc/attachment.html>


More information about the Sugar-devel mailing list