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


Java TextStyle类代码示例

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


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

示例1: MapCoverageLayer

import org.oscim.theme.styles.TextStyle; //导入依赖的package包/类
public MapCoverageLayer(Context context, Map map, Index mapIndex, float scale) {
    super(map);
    mContext = context;
    mMapIndex = mapIndex;
    mPresentAreaStyle = AreaStyle.builder().fadeScale(FADE_ZOOM).blendColor(COLOR_ACTIVE).blendScale(10).color(Color.fade(COLOR_ACTIVE, AREA_ALPHA)).build();
    mOutdatedAreaStyle = AreaStyle.builder().fadeScale(FADE_ZOOM).blendColor(COLOR_OUTDATED).blendScale(10).color(Color.fade(COLOR_OUTDATED, AREA_ALPHA)).build();
    mMissingAreaStyle = AreaStyle.builder().fadeScale(FADE_ZOOM).blendColor(COLOR_MISSING).blendScale(10).color(Color.fade(COLOR_MISSING, AREA_ALPHA)).build();
    mDownloadingAreaStyle = AreaStyle.builder().fadeScale(FADE_ZOOM).blendColor(COLOR_DOWNLOADING).blendScale(10).color(Color.fade(COLOR_DOWNLOADING, AREA_ALPHA)).build();
    mSelectedAreaStyle = AreaStyle.builder().fadeScale(FADE_ZOOM).blendColor(COLOR_SELECTED).blendScale(10).color(Color.fade(COLOR_SELECTED, AREA_ALPHA)).build();
    mDeletedAreaStyle = AreaStyle.builder().fadeScale(FADE_ZOOM).blendColor(COLOR_DELETED).blendScale(10).color(Color.fade(COLOR_DELETED, AREA_ALPHA)).build();
    mLineStyle = LineStyle.builder().fadeScale(FADE_ZOOM + 1).color(Color.fade(Color.DKGRAY, 0.6f)).strokeWidth(0.5f * scale).fixed(true).build();
    mTextStyle = TextStyle.builder().fontSize(11 * scale).fontStyle(Paint.FontStyle.BOLD).color(COLOR_TEXT).strokeColor(COLOR_TEXT_OUTLINE).strokeWidth(7f).build();
    mSmallTextStyle = TextStyle.builder().fontSize(8 * scale).fontStyle(Paint.FontStyle.BOLD).color(COLOR_TEXT).strokeColor(COLOR_TEXT_OUTLINE).strokeWidth(5f).build();
    mHillshadesBitmap = getHillshadesBitmap(Color.fade(Color.DKGRAY, 0.8f));
    mPresentHillshadesBitmap = getHillshadesBitmap(Color.WHITE);
    mDateFormat = DateFormat.getDateFormat(context);
    mMapIndex.addMapStateListener(this);
    mAccountHillshades = Configuration.getHillshadesEnabled();
}
 
开发者ID:andreynovikov,项目名称:trekarta,代码行数:20,代码来源:MapCoverageLayer.java

示例2: handleTextElement

import org.oscim.theme.styles.TextStyle; //导入依赖的package包/类
private void handleTextElement(String localName, Attributes attributes, boolean isStyle,
        boolean isCaption) throws SAXException {

	String style = attributes.getValue("use");
	TextBuilder<?> pt = null;

	if (style != null) {
		pt = mTextStyles.get(style);
		if (pt == null) {
			log.debug("missing text style: " + style);
			return;
		}
	}

	TextBuilder<?> b = createText(localName, attributes, isCaption, pt);
	if (isStyle) {
		log.debug("put style {}", b.style);
		mTextStyles.put(b.style, TextStyle.builder().from(b));
	} else {
		mCurrentRule.addStyle(b.buildInternal());
	}
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:23,代码来源:XmlThemeBuilder.java

示例3: GridRendererMT

import org.oscim.theme.styles.TextStyle; //导入依赖的package包/类
public GridRendererMT(final float scale) {

		this(
				1,

				new LineStyle(Color.GRAY, 1.2f * scale, Cap.BUTT),

				TextStyle
						.builder()
						.fontSize(26 * scale)
						.fontStyle(Paint.FontStyle.NORMAL)
						.color(Color.RED)
						.build());
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:15,代码来源:GridRendererMT.java

示例4: groupLabels

import org.oscim.theme.styles.TextStyle; //导入依赖的package包/类
/**
 * group labels by string and type
 */
protected Label groupLabels(final Label labels) {
	for (Label cur = labels; cur != null; cur = (Label) cur.next) {
		/* keep pointer to previous for removal */
		Label p = cur;
		final TextStyle t = cur.text;
		final float w = cur.width;

		/* iterate through following */
		for (Label l = (Label) cur.next; l != null; l = (Label) l.next) {

			if (w != l.width || t != l.text || !cur.label.equals(l.label)) {
				p = l;
				continue;
			} else if (cur.next == l) {
				l.label = cur.label;
				p = l;
				continue;
			}
			l.label = cur.label;

			/* insert l after cur */
			final Label tmp = (Label) cur.next;
			cur.next = l;

			/* continue outer loop at l */
			cur = l;

			/* remove l from previous place */
			p.next = l.next;
			l.next = tmp;

			/* continue from previous */
			l = p;
		}
	}
	return labels;
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:41,代码来源:LabelPlacement.java

示例5: set

import org.oscim.theme.styles.TextStyle; //导入依赖的package包/类
public TextItem set(float x, float y, String string, TextStyle text) {
	this.x = x;
	this.y = y;
	this.string = string;
	this.text = text;
	this.x1 = 0;
	this.y1 = 0;
	this.x2 = 1;
	this.y2 = 0;
	this.width = text.paint.measureText(string);
	return this;
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:13,代码来源:TextItem.java

示例6: GridRenderer

import org.oscim.theme.styles.TextStyle; //导入依赖的package包/类
public GridRenderer() {
	this(1, new LineStyle(Color.LTGRAY, 1.2f, Cap.BUTT),
	     TextStyle.builder()
	         .fontSize(22)
	         .color(Color.RED)
	         .build());
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:8,代码来源:GridRenderer.java

示例7: groupLabels

import org.oscim.theme.styles.TextStyle; //导入依赖的package包/类
/** group labels by string and type */
protected Label groupLabels(Label labels) {
	for (Label cur = labels; cur != null; cur = (Label) cur.next) {
		/* keep pointer to previous for removal */
		Label p = cur;
		TextStyle t = cur.text;
		float w = cur.width;

		/* iterate through following */
		for (Label l = (Label) cur.next; l != null; l = (Label) l.next) {

			if (w != l.width || t != l.text || !cur.string.equals(l.string)) {
				p = l;
				continue;
			} else if (cur.next == l) {
				l.string = cur.string;
				p = l;
				continue;
			}
			l.string = cur.string;

			/* insert l after cur */
			Label tmp = (Label) cur.next;
			cur.next = l;

			/* continue outer loop at l */
			cur = l;

			/* remove l from previous place */
			p.next = l.next;
			l.next = tmp;

			/* continue from previous */
			l = p;
		}
	}
	return labels;
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:39,代码来源:LabelPlacement.java

示例8: renderText

import org.oscim.theme.styles.TextStyle; //导入依赖的package包/类
@Override
public void renderText(TextStyle text) {
	mTileLayer.callThemeHooks(mTile, mBuckets, mElement, text, 0);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:5,代码来源:VectorTileLoader.java

示例9: TileGridLayer

import org.oscim.theme.styles.TextStyle; //导入依赖的package包/类
public TileGridLayer(Map map, int color, float width, TextStyle text, int repeat) {
	super(map, new GridRenderer(repeat, new LineStyle(color, width, Cap.BUTT), text));
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:4,代码来源:TileGridLayer.java

示例10: wayText

import org.oscim.theme.styles.TextStyle; //导入依赖的package包/类
public static TextBuilder<?> wayText(float size, int color) {
	return TextStyle.builder()
	    .fontSize(size)
	    .color(color);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:6,代码来源:ThemeBuilder.java

示例11: nodeText

import org.oscim.theme.styles.TextStyle; //导入依赖的package包/类
public static TextBuilder<?> nodeText(float size, int color) {
	return TextStyle.builder()
	    .fontSize(size)
	    .color(color)
	    .isCaption(true);
}
 
开发者ID:opensciencemap,项目名称:vtm,代码行数:7,代码来源:ThemeBuilder.java


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