From: Tilen Jez on
Hi Stefan,

Thanks for explaining this to me. I will try what you are suggesting
and use wxMemoryDC. I think that this may actually be the best
solution in my case.

Best Regards,
Tilen

On Jan 26, 2007, at 10:16 AM, Stefan Csomor wrote:

> Hi Tilen
>
> the problem with the new graphics engines are that "flushes" to the
> display become expensive, on the latest OSX you shouldn't update more
> frequently than at half the refresh rate, otherwise your program will
> become blocked, while waiting for the next refresh cycle. So while you
> think that it is just doing a LineTo, behind your back there is a lot
> more blitting and synchronizing going on. Depending on the app you are
> working on, the best solution might be to have a backing bitmap, on
> which you draw using a memory dc at the moments you want to, and only
> blit from that at OnPaint time.
>
> Best Regards,
>
> Stefan
>
>> -----Original Message-----
>> From: Tilen Jez [mailto:tilen.jez(a)ambitiongroup.com]
>> Sent: Donnerstag, 25. Januar 2007 17:25
>> To: wx-users(a)lists.wxwidgets.org
>> Subject: Re: wxScrolledWindow problems in wxMac 2.8.0
>>
>> Hi,
>>
>> Thank you for the info.
>>
>> I see how this could be done using wxPaintDC, but is this really the
>> correct approach? Say if one wants to draw a line between two points,
>> which is a trivial task using wxClientDC, using wxPaintDC the region
>> needs to be invalidated and everything on it repainted during
>> wxPaintEvent.
>>
>> Best Regards,
>> Tilen
>>
>>
>> On Jan 25, 2007, at 3:30 PM, Julian Smart wrote:
>>
>>> Tilen Jez wrote:
>>>> Hello again,
>>>>
>>>> I don't think so. I need to draw on the window during mouse
>> events.
>>> Although you may need to refactor the code slightly, you should
>>> still be able to do this with wxPaintDC
>>> by calling wxWindow::RefreshRect followed by Update, and optimizing
>>> your code so it only draws
>>> the necessary graphics within the current update region. See
>>> wxPaintEvent for an example of
>>> iterating through update rectangles.
>>>
>>> Or, compile wxMac with wxMAC_USE_CORE_GRAPHICS set to 0 in include/
>>> wx/mac/carbon/chkconf.h...
>>>
>>> Regards,
>>>
>>> Julian
>>>
>>>
>>> -------------------------------------------------------------------
>> --
>>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
>>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
>> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org