Paul Ishenin ha scritto:

Adriaan van Os wrote:

>>> LCL supports drawing only on paint event. Yes, 'arbitrary drawing' is
 >>> possible with win32 and gtk widgetsets, but not with carbon and qt.
>>> The only legal way for you is to move all that Canvas calls to OnPaint.
 >>
 >> I assume that "the only legal way" is to be read as "currently not
 >> implemented".

Paul Ishenin wrote:

Read that "will not be implemented before 1.0 or maybe never".


Vincent Snijders wrote:
> It is doubtful, if it is possible to implement it. Do you have ideas how
 > it can be accomplished?

May I revert the question, what has to be done to make it work now ? Would that be an acceptable patch (now) ? What issues are there apart from buffer-flushing and (probably) clipping ?


eehh...

I can answer about qt. Qt Widgets have apropriate event QEventPaint where all painting should be done. We just map that event to OnPaint of TWinControl. So all painting inside OnPaint are legal for Qt library while painting outside not.

I know (mostly from other devels - hope they will answer too) that carbon behave same way.

So some workarounds should be done to implement painting outside paint event.

Possible workarounds:
- perform all painting outside paint event to special image and later (in paint event handler) apply this painting to widget window - if painting outside paint event is happen then a) request window redraw, so paint event should be called b) wait until paint event happen

I dont know, maybe other can suggest something better.

If Lazarus is intended to be Delphi compatible, Delphi provides for Tcontrol descendants (and also for a number of other of visual objects not descending from TControl, such as TPanel) an Invalidate method which, according the manuals "completely repaints the control" providing a flicker free update of the control, if multiple regions must be repainted simultaneously. Always according the manual, "there's no performance penalty for calling invalidate multiple times before the control is actually repainted".
Could this be an answer to the question?

Giuliano

--
Giuliano Colla

Still using C++ and Visual Studio? I'm using Object Pascal and Lazarus.


_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to