简体   繁体   中英

How to adjust contrast, darken/lighten vector graphics using dojox.gfx

I am using dojox.gfx to create and manipulate vector graphics. I need to adjust contrast and apply blur, darken/lighten effect on them?

And the browser I need to support are IE 8+. So, I have to achieve these things on SVG(IE 9) and VML(IE 8)

Is there a way to achieve this? Through dojo or any other library.

This is for svg:

<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">
<filter id="brightness">
    <feComponentTransfer>
        <feFuncR type="linear" slope="4"/>
    <feFuncG type="linear" slope="4"/>
    <feFuncB type="linear" slope="4"/>
 </feComponentTransfer>
</filter>
<image filter="url(#brightness)" x="0" y="0" width="200" height="100" xlink:href="pic.png" />       
</svg>

For VML I'm not sure.

It might be the blacklevel attribute,values are between -0.5(pure black) and 0.5(pure white)

<v:image style='width:200px;height:100px' src="images/temporary/pic2.png" blacklevel="-0.2"/>

This is the link for the vml blacklevel attribute

http://msdn.microsoft.com/en-us/library/bb229563%28v=vs.85%29.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM