Java Code Examples for mil.nga.geopackage.extension.style.StyleRow#hasColor()

The following examples show how to use mil.nga.geopackage.extension.style.StyleRow#hasColor() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FeatureTiles.java    From geopackage-android with MIT License 4 votes vote down vote up
/**
 * Get the feature style paint from cache, or create and cache it
 *
 * @param featureStyle feature style
 * @param drawType     draw type
 * @return feature style paint
 */
private Paint getFeatureStylePaint(FeatureStyle featureStyle, FeatureDrawType drawType) {

    Paint paint = null;

    if (featureStyle != null) {

        StyleRow style = featureStyle.getStyle();

        if (style != null && style.hasColor()) {

            paint = getStylePaint(style, drawType);

        }
    }

    return paint;
}
 
Example 2
Source File: FeatureTiles.java    From geopackage-java with MIT License 4 votes vote down vote up
/**
 * Get the feature style paint from cache, or create and cache it
 *
 * @param featureStyle
 *            feature style
 * @param drawType
 *            draw type
 * @return feature style paint
 */
private Paint getFeatureStylePaint(FeatureStyle featureStyle,
		FeatureDrawType drawType) {

	Paint paint = null;

	if (featureStyle != null) {

		StyleRow style = featureStyle.getStyle();

		if (style != null && style.hasColor()) {

			paint = getStylePaint(style, drawType);

		}
	}

	return paint;
}
 
Example 3
Source File: FeatureTiles.java    From geopackage-android with MIT License 3 votes vote down vote up
/**
 * Get the polygon fill paint for the feature style, or return the default paint
 *
 * @param featureStyle feature style
 * @return paint
 */
protected Paint getPolygonFillPaint(FeatureStyle featureStyle) {

    Paint paint = null;

    boolean hasStyleColor = false;

    if (featureStyle != null) {

        StyleRow style = featureStyle.getStyle();

        if (style != null) {

            if (style.hasFillColor()) {
                paint = getStylePaint(style, FeatureDrawType.FILL);
            } else {
                hasStyleColor = style.hasColor();
            }

        }

    }

    if (paint == null && !hasStyleColor && fillPolygon) {
        paint = polygonFillPaint;
    }

    return paint;
}
 
Example 4
Source File: FeatureTiles.java    From geopackage-java with MIT License 3 votes vote down vote up
/**
 * Get the polygon fill paint for the feature style, or return the default
 * paint
 *
 * @param featureStyle
 *            feature style
 * @return paint
 */
protected Paint getPolygonFillPaint(FeatureStyle featureStyle) {

	Paint paint = null;

	boolean hasStyleColor = false;

	if (featureStyle != null) {

		StyleRow style = featureStyle.getStyle();

		if (style != null) {

			if (style.hasFillColor()) {
				paint = getStylePaint(style, FeatureDrawType.FILL);
			} else {
				hasStyleColor = style.hasColor();
			}

		}

	}

	if (paint == null && !hasStyleColor && fillPolygon) {
		paint = polygonFillPaint;
	}

	return paint;
}