rafael2k / fog

Automatically exported from code.google.com/p/fog
1 stars 1 forks source link

About onPrepare,onPrepare,onPattern #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, Can you tell me what means about the function "onPrepare","onPrepare" 
,"onPattern" in SvgElement ?
Sorry ,the time of learning the fog is very short, I can't understand……

Original issue reported on code.google.com by weolar@gmail.com on 14 Sep 2011 at 4:04

GoogleCodeExporter commented 9 years ago
Hi, of course:)

onPrepare() is called when SvgElement is being rendered. The purpose of the 
function is  to setup all painting states to the SvgVisitor (the state 
machine). It does setting of stroke style, fill style, font and font style, and 
transform. In future it should also setup clipping (not implemented currently).

onProcess() is called to render, hit-test, or measure element. The purpose of 
the function is to serialize the element into the SvgVisitor. If SvgVisitor is 
renderer then it will be rendered, if it's SvgMeasure then measured, etc...

onPattern() is called to prepare pattern context for the element. It's only 
reimplemented by the SvgLinearGradient, SvgRadialGradient, and SvgPattern 
elements.

BTW: Please use mailing list (google groups) for questions, this is place 
mainly for bug reporting, not discussion;)

Thanks.
Petr

Original comment by kobalicek.petr on 14 Sep 2011 at 6:47

GoogleCodeExporter commented 9 years ago
Closed, because it's not bug;)

Original comment by kobalicek.petr on 5 Dec 2011 at 6:42