[webkit-dev] How can I get the Image object from the StyleImage object

hap 497 hap497 at gmail.com
Sun Mar 21 18:51:37 PDT 2010


I would like to know how can I get the ImageObject(the one which
passes for painting) from a StyleImage object?

I am able to get the StyleImage of my element using:

 RenderObject *o = element->renderer();
   RenderStyle* style = o->style();
 StyleImage* bgImage = style->backgroundImage();

My question is how can I get the Image being painted (the one which is
actual pass to Graphics Context)?

I see this method in StyleImage, but how can I use that? How can I
find out the IntSize which is used for painting?
 virtual Image* image(RenderObject*, const IntSize&) const = 0;

Thank you for your help.

More information about the webkit-dev mailing list