Christopher Barker wrote:
> Ørjan Pettersen wrote:
>
>> I have a bitmap with a size of 50x50. But when I add it to a FloatCanvas
>> it turns up very very small. How do I make them appear in normal
>> size(50x50)?
>>
>> btm = MovingBitmap(wx.Bitmap('images/out.png'), (0,0), 1,
>> Position='cc')
>>
>
> in this case, you've set the hieght of the bitmap to 1 is world
> coordinates -- make that bigger, and the bitmap will be bigger.
>
Thanks, it solves everything beautifully. Just add the original bitmap
height and it
turns out like it should.
> In the future, it's helpful to post a complete (but small) working
> application if can -- that was we can quickly test stuff for you:
>
> http://wiki.wxpython.org/MakingSampleApps
>
>
Yes, I usually do this, but since I used my own bitmap I assumed it
would be to much of a hassle to test it anyway. But I'll
add a small sample program when I ask questions.
>>> I guess focus means highlighting the object somehow (e.g. drawing
>>> transparent rectangle over it or hollow rectangle box around it).
>>>
>>>
>> Exactly. But if this is not native, i guess it won't be hard to create
>> it based on left click event.
>>
>
> correct. It's not native. I can quickly think of three ways to
> accomplish it:
>
> 1) create your own DrawObject that has a "selected" attribute, and have
> it drawn differently if it is selected
>
> 2) add another object to the Canvas on top of the selected object hat
> draws something to make it look selected.
>
> 3) create a group object, and put your object in it, and another one on
> top that makes it look selected.
>
>
> Maybe this should be built-in -- I"m trying to think of a way to add it
> to the base DrawObject, but I'm not sure how to intercept the _Draw
> method...
>
> -Chris
>
I'll figure something out. Probably just add another object on top.
Thanks for the help.
Oerjan...
_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas