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


Java Pattern类代码示例

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


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

示例1: doFilledPath

import com.caverock.androidsvg.SVG.Pattern; //导入依赖的package包/类
private void doFilledPath(SvgElement obj, Path path)
{
   // First check for pattern fill. It requires special handling.
   if (state.style.fill instanceof SVG.PaintReference)
   {
      SVG.SvgObject  ref = document.resolveIRI(((SVG.PaintReference) state.style.fill).href);
      if (ref instanceof SVG.Pattern) {
         SVG.Pattern  pattern = (SVG.Pattern)ref;
         fillWithPattern(obj, path, pattern);
         return;
      }
   }

   // Otherwise do a normal fill
   canvas.drawPath(path, state.fillPaint);
}
 
开发者ID:moneymanagerex,项目名称:android-money-manager-ex,代码行数:17,代码来源:SVGAndroidRenderer.java

示例2: doFilledPath

import com.caverock.androidsvg.SVG.Pattern; //导入依赖的package包/类
private void doFilledPath(SvgElement obj, Path path) {
	// First check for pattern fill. It requires special handling.
	if (state.style.fill instanceof SVG.PaintReference) {
		SVG.SvgObject ref = document
				.resolveIRI(((SVG.PaintReference) state.style.fill).href);
		if (ref instanceof SVG.Pattern) {
			SVG.Pattern pattern = (SVG.Pattern) ref;
			fillWithPattern(obj, path, pattern);
			return;
		}
	}

	// Otherwise do a normal fill
	canvas.drawPath(path, state.fillPaint);
}
 
开发者ID:mkulesh,项目名称:microMathematics,代码行数:16,代码来源:SVGAndroidRenderer.java

示例3: doFilledPath

import com.caverock.androidsvg.SVG.Pattern; //导入依赖的package包/类
private void doFilledPath(SvgElement obj, Path path) {
    // First check for pattern fill. It requires special handling.
    if (state.style.fill instanceof SVG.PaintReference) {
        SVG.SvgObject ref = document.resolveIRI(((SVG.PaintReference) state.style.fill).href);
        if (ref instanceof SVG.Pattern) {
            SVG.Pattern pattern = (SVG.Pattern) ref;
            fillWithPattern(obj, path, pattern);
            return;
        }
    }

    // Otherwise do a normal fill
    canvas.drawPath(path, state.fillPaint);
}
 
开发者ID:StepicOrg,项目名称:stepik-android,代码行数:15,代码来源:SVGAndroidRenderer.java

示例4: fillInChainedPatternFields

import com.caverock.androidsvg.SVG.Pattern; //导入依赖的package包/类
private void fillInChainedPatternFields(Pattern pattern, String href) {
	// Locate the referenced object
	SVG.SvgObject ref = pattern.document.resolveIRI(href);
	if (ref == null) {
		// Non-existent
		warn("Pattern reference '%s' not found", href);
		return;
	}
	if (!(ref instanceof Pattern)) {
		error("Pattern href attributes must point to other pattern elements");
		return;
	}
	if (ref == pattern) {
		error("Circular reference in pattern href attribute '%s'", href);
		return;
	}

	Pattern pRef = (Pattern) ref;

	if (pattern.patternUnitsAreUser == null)
		pattern.patternUnitsAreUser = pRef.patternUnitsAreUser;
	if (pattern.patternContentUnitsAreUser == null)
		pattern.patternContentUnitsAreUser = pRef.patternContentUnitsAreUser;
	if (pattern.patternTransform == null)
		pattern.patternTransform = pRef.patternTransform;
	if (pattern.x == null)
		pattern.x = pRef.x;
	if (pattern.y == null)
		pattern.y = pRef.y;
	if (pattern.width == null)
		pattern.width = pRef.width;
	if (pattern.height == null)
		pattern.height = pRef.height;
	// attributes from superclasses
	if (pattern.children.isEmpty())
		pattern.children = pRef.children;
	if (pattern.viewBox == null)
		pattern.viewBox = pRef.viewBox;
	if (pattern.preserveAspectRatio == null) {
		pattern.preserveAspectRatio = pRef.preserveAspectRatio;
	}

	if (pRef.href != null)
		fillInChainedPatternFields(pattern, pRef.href);
}
 
开发者ID:mkulesh,项目名称:microMathematics,代码行数:46,代码来源:SVGAndroidRenderer.java

示例5: fillInChainedPatternFields

import com.caverock.androidsvg.SVG.Pattern; //导入依赖的package包/类
private void fillInChainedPatternFields(Pattern pattern, String href) {
    // Locate the referenced object
    SVG.SvgObject ref = pattern.document.resolveIRI(href);
    if (ref == null) {
        // Non-existent
        warn("Pattern reference '%s' not found", href);
        return;
    }
    if (!(ref instanceof Pattern)) {
        error("Pattern href attributes must point to other pattern elements");
        return;
    }
    if (ref == pattern) {
        error("Circular reference in pattern href attribute '%s'", href);
        return;
    }

    Pattern pRef = (Pattern) ref;

    if (pattern.patternUnitsAreUser == null)
        pattern.patternUnitsAreUser = pRef.patternUnitsAreUser;
    if (pattern.patternContentUnitsAreUser == null)
        pattern.patternContentUnitsAreUser = pRef.patternContentUnitsAreUser;
    if (pattern.patternTransform == null)
        pattern.patternTransform = pRef.patternTransform;
    if (pattern.x == null)
        pattern.x = pRef.x;
    if (pattern.y == null)
        pattern.y = pRef.y;
    if (pattern.width == null)
        pattern.width = pRef.width;
    if (pattern.height == null)
        pattern.height = pRef.height;
    // attributes from superclasses
    if (pattern.children.isEmpty())
        pattern.children = pRef.children;
    if (pattern.viewBox == null)
        pattern.viewBox = pRef.viewBox;
    if (pattern.preserveAspectRatio == null) {
        pattern.preserveAspectRatio = pRef.preserveAspectRatio;
    }

    if (pRef.href != null)
        fillInChainedPatternFields(pattern, pRef.href);
}
 
开发者ID:StepicOrg,项目名称:stepik-android,代码行数:46,代码来源:SVGAndroidRenderer.java

示例6: fillInChainedPatternFields

import com.caverock.androidsvg.SVG.Pattern; //导入依赖的package包/类
private void fillInChainedPatternFields(Pattern pattern, String href)
{
   // Locate the referenced object
   SVG.SvgObject  ref = pattern.document.resolveIRI(href);
   if (ref == null) {
      // Non-existent
      warn("Pattern reference '%s' not found", href);
      return;
   }
   if (!(ref instanceof Pattern)) {
      error("Pattern href attributes must point to other pattern elements");
      return;
   }
   if (ref == pattern) {
      error("Circular reference in pattern href attribute '%s'", href);
      return;
   }

   Pattern  pRef = (Pattern) ref;

   if (pattern.patternUnitsAreUser == null)
      pattern.patternUnitsAreUser = pRef.patternUnitsAreUser;
   if (pattern.patternContentUnitsAreUser == null)
      pattern.patternContentUnitsAreUser = pRef.patternContentUnitsAreUser;
   if (pattern.patternTransform == null)
      pattern.patternTransform = pRef.patternTransform;
   if (pattern.x == null)
      pattern.x = pRef.x;
   if (pattern.y == null)
      pattern.y = pRef.y;
   if (pattern.width == null)
      pattern.width = pRef.width;
   if (pattern.height == null)
      pattern.height = pRef.height;
   // attributes from superclasses
   if (pattern.children.isEmpty())
      pattern.children = pRef.children;
   if (pattern.viewBox == null)
      pattern.viewBox = pRef.viewBox;
   if (pattern.preserveAspectRatio == null) {
      pattern.preserveAspectRatio = pRef.preserveAspectRatio;
   }

   if (pRef.href != null)
      fillInChainedPatternFields(pattern, pRef.href);
}
 
开发者ID:moneymanagerex,项目名称:android-money-manager-ex,代码行数:47,代码来源:SVGAndroidRenderer.java


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