當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。