Understanding two methods: Paint() and Draw()

Hi,
For many graphic classes in ROOT, such as TPaveText, their two methods often confuse me: Paint() and Draw(). Any expert could introduce exactly what they mean and the difference in concept?

Cheers,
Zhiyi.

read : root.cern.ch/drupal/content/how-draw-objects

Rene

see also: root.cern.ch/drupal/content/graphics-pad

[quote=“zhiyiliu”]two methods often confuse me: Paint() and Draw().[/quote]a) “Draw” method is to add the object pointer to the list of the objects to be rendered later on by TPad.
b) Normally, the base method TObject::Draw is sufficient and one doesn’t need to overload it.
c) It is to be invoked at once per each TObject/TPad pair.
[size=60]( for example one doesn’t need to call TH1F::Draw to update the histogram appearance on the screen each time one adds the new value with Fill method) [/size]
d) It is invoked by the user code.

a) “Paint” method is to render the objects from the TPad list created by Draw() method.
b) The Paint method is to be overloaded for each TObject subclass to provide the customized painting.
c) It is called each time the TPad/TCanvas are to be updated.
d) There is no reason to call Paint from the user code. The method Paint is designed to be called by TPad “as needed”[quote=“zhiyiliu”] Any expert could introduce exactly what they mean and the difference in concept?[/quote]Draw is to communicate the user’s “generic” request to visualize some object.
Paint defines how the concrete object is to be painted to fulfill the user’s request.

Thank you, fine. it is quite helpful.

Zhiyi.