当前位置: 首页>>代码示例>>Java>>正文


Java ShadowPathEffect类代码示例

本文整理汇总了Java中org.jdesktop.swingx.painter.effects.ShadowPathEffect的典型用法代码示例。如果您正苦于以下问题:Java ShadowPathEffect类的具体用法?Java ShadowPathEffect怎么用?Java ShadowPathEffect使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ShadowPathEffect类属于org.jdesktop.swingx.painter.effects包,在下文中一共展示了ShadowPathEffect类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addRasterizedTextLayer

import org.jdesktop.swingx.painter.effects.ShadowPathEffect; //导入依赖的package包/类
private static void addRasterizedTextLayer(Composition ic, String text, Color textColor, Font font, int translationY, BlendingMode blendingMode, float opacity, boolean dropShadow) {
    addNewLayer(text);
    TextFilter textFilter = TextFilter.INSTANCE;

    AreaEffects effects = null;
    if (dropShadow) {
        effects = new AreaEffects();
        effects.setDropShadowEffect(new ShadowPathEffect(1.0f));
    }

    TextSettings settings = new TextSettings(text, font, textColor, effects,
            AbstractLayoutPainter.HorizontalAlignment.CENTER,
            AbstractLayoutPainter.VerticalAlignment.CENTER, false);

    textFilter.setSettings(settings);
    textFilter.execute(OP_WITHOUT_DIALOG);
    ImageLayer layer = (ImageLayer) ic.getActiveLayer();
    layer.setTranslation(0, translationY);

    layer.enlargeLayer();

    layer.setOpacity(opacity, true, AddToHistory.YES, true);
    layer.setBlendingMode(blendingMode, true, AddToHistory.YES, true);
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:25,代码来源:ImageTests.java

示例2: initDropShadowConfigurator

import org.jdesktop.swingx.painter.effects.ShadowPathEffect; //导入依赖的package包/类
private void initDropShadowConfigurator(AreaEffects effects) {
    boolean defaultEnabled = false;
    Color defaultColor = BLACK;
    int defaultDistance = 10;
    double defaultAngle = 0.7;
    int defaultSpread = 10;
    if (effects != null) {
        ShadowPathEffect effect = effects.getDropShadowEffect();
        if (effect != null) {
            defaultEnabled = true;
            defaultColor = effect.getBrushColor();

            Point2D offset = effect.getOffset();
            double x = offset.getX();
            double y = offset.getY();
            defaultDistance = (int) Math.sqrt(x * x + y * y);
            defaultAngle = Math.atan2(y, x);

            defaultSpread = effect.getEffectWidth();
        }
    }
    dropShadowConfigurator = new DropShadowEffectConfiguratorPanel(
            defaultEnabled, defaultColor, defaultDistance, defaultAngle, defaultSpread);
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:25,代码来源:EffectsPanel.java

示例3: createRandom

import org.jdesktop.swingx.painter.effects.ShadowPathEffect; //导入依赖的package包/类
public static AreaEffects createRandom(Random rand) {
    AreaEffects ae = new AreaEffects();
    float f = rand.nextFloat();
    if(f < 0.25f) {
        ae.setNeonBorderEffect(new NeonBorderEffect());
    } else if(f < 0.5f) {
        ae.setDropShadowEffect(new ShadowPathEffect(1.0f));
    } else if(f < 0.75f) {
        ae.setInnerGlowEffect(new InnerGlowPathEffect(1.0f));
    } else {
        ae.setGlowEffect(new GlowPathEffect(1.0f));
    }
    return ae;
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:15,代码来源:AreaEffects.java

示例4: createAreaEffectsList

import org.jdesktop.swingx.painter.effects.ShadowPathEffect; //导入依赖的package包/类
/**
 * Create and returns model for effects selection combobox
 * @return
 */
private ComboBoxModel createAreaEffectsList() {
    DefaultComboBoxModel model = new DefaultComboBoxModel();
    model.addElement(new DisplayInfo<AreaEffect>(" - none -", null));
    model.addElement(new DisplayInfo<AreaEffect>(new GlowPathEffect()));
    model.addElement(new DisplayInfo<AreaEffect>(new InnerGlowPathEffect()));
    model.addElement(new DisplayInfo<AreaEffect>(new InnerShadowPathEffect()));
    model.addElement(new DisplayInfo<AreaEffect>(new NeonBorderEffect()));
    model.addElement(new DisplayInfo<AreaEffect>(new ShadowPathEffect()));
    return model;
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:15,代码来源:PainterDemo.java

示例5: setDropShadowEffect

import org.jdesktop.swingx.painter.effects.ShadowPathEffect; //导入依赖的package包/类
public void setDropShadowEffect(ShadowPathEffect dropShadowEffect) {
    this.dropShadowEffect = dropShadowEffect;
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:4,代码来源:AreaEffects.java

示例6: getDropShadowEffect

import org.jdesktop.swingx.painter.effects.ShadowPathEffect; //导入依赖的package包/类
public ShadowPathEffect getDropShadowEffect() {
    return dropShadowEffect;
}
 
开发者ID:teddyted,项目名称:iSeleda,代码行数:4,代码来源:AreaEffects.java


注:本文中的org.jdesktop.swingx.painter.effects.ShadowPathEffect类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。