Package libshapedraw.primitive

Examples of libshapedraw.primitive.ReadonlyLineStyle


        return getRenderCap() - 1;
    }

    @Override
    protected void renderLines(MinecraftAccess mc, boolean isSecondary) {
        final ReadonlyLineStyle fromStyle = getEffectiveLineStyle();
        final ReadonlyLineStyle toStyle = getBlendToLineStyle();
        if (toStyle == null || getBlendEndpoint() <= 0) {
            super.renderLines(mc, isSecondary);
            return;
        }
        if (isSecondary && !toStyle.hasSecondaryColor()) {
            super.renderLines(mc, isSecondary);
            return;
        }

        final int renderCap = getRenderCap();
        final Iterator<ReadonlyVector3> it = getPoints().iterator();
        if (renderCap == 0 || !it.hasNext()) {
            return;
        }

        final ReadonlyColor fromColor;
        final ReadonlyColor toColor;
        final float fromWidth;
        final float toWidth;
        // we've already checked for all null cases earlier
        if (isSecondary) {
            fromColor = fromStyle.getSecondaryReadonlyColor();
            toColor   =   toStyle.getSecondaryReadonlyColor();
            fromWidth = fromStyle.getSecondaryWidth();
            toWidth   =   toStyle.getSecondaryWidth();
        } else {
            fromColor = fromStyle.getMainReadonlyColor();
            toColor   =   toStyle.getMainReadonlyColor();
            fromWidth = fromStyle.getMainWidth();
            toWidth   =   toStyle.getMainWidth();
        }
        final float blendEndpoint = getBlendEndpoint();

        // We can't use GL_LINE_STRIP in a single drawing session because each
        // line segment has its own style.
View Full Code Here


        super(origin);
    }

    @Override
    protected void renderShape(MinecraftAccess mc) {
        ReadonlyLineStyle drawStyle = getEffectiveLineStyle();
        drawStyle.glApply(false);
        renderLines(mc, false);
        if (drawStyle.glApply(true)) {
            renderLines(mc, true);
        }
    }
View Full Code Here

TOP

Related Classes of libshapedraw.primitive.ReadonlyLineStyle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.