• repeatbehavior > http://weblogsjavanet/blog/chet
  • http://weblogsjavanet/blog/chet

    免费下载 下载该文档 文档格式:PDF   更新时间:2009-12-01   下载次数:0   点击次数:1
    文档基本属性
    文档语言:Simplified Chinese
    文档格式:pdf
    文档作者:李贵雄
    关键词:
    主题:
    备注:
    点击这里显示更多文档属性
    www.javapolis.com
    Radial Gradient
    Useful for lighting effects

    Specular highlights Shadows java.awt.RadialGradientPaint
    Available in Java SE 6
    www.javapolis.com
    DEMO
    Gradients
    Optimizing Gradients

    Cache gradients in images Use stretched images

    Draw gradient in a 1-pixel wide image Paint the image and stretch its width Works with vertical and horizontal gradients only Avoids boundary tests See Javadoc for appropriate constructors
    Use cyclic gradients

    www.javapolis.com
    Agenda

    Gradients Composites Glass Pane Blur Shadow Animation Animated Transitions
    www.javapolis.com
    Composites
    Java 2D draws primitives into a destination
    Primitive == source Combines colors of source and destination Ex.: "Copy only the blue value of source into destination" Adobe Photoshop, The GIMP, … "Blending modes"
    A composite is a rule

    Common in graphics editing tools

    www.javapolis.com
    Composites in the JDK
    One interface
    java.awt.Composite java.awt.AlphaComposite Graphics2D.setComposite(Composite) Graphics2D.getComposite()
    One implementation
    One usage

    www.javapolis.com
    AlphaComposite
    Basic alpha compositing rules
    Translucency effects Porter and Duff, 1984, "Compositing Digital Images" Affect pixels opacity and color Value in range [0..1] Defines the opacity (1.0 is 100% opaque)
    12 rules
    Alpha channel

    上一页下一页

  • 下载地址 (推荐使用迅雷下载地址,速度快,支持断点续传)
  • 免费下载 PDF格式下载
  • 您可能感兴趣的
  • behavior  usesubmitbehavior  commandbehavior  fluidmovebehavior  style.behavior  behavior可数吗  loadbehavior  servicebehavior  behavior是什么意思  behavior用法