- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.koolearn.klibrary.core.view.ZLPaintContext
类的一些代码示例,展示了ZLPaintContext
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZLPaintContext
类的具体详情如下:
包路径:com.koolearn.klibrary.core.view.ZLPaintContext
类名称:ZLPaintContext
暂无
代码示例来源:origin: Jiangzqts/EpubRead
private final void drawString(ZLPaintContext context, int x, int y, char[] str, int offset, int length, ZLTextWord.Mark mark, ZLColor color, int shift) {
if (mark == null) {
context.setTextColor(color);
context.drawString(x, y, str, offset, length);
} else {
LogUtil.i10("drawString");
context.setTextColor(color);
context.drawString(x, y, str, offset + pos, endPos - pos);
x += context.getStringWidth(str, offset + pos, endPos - pos);
context.setFillColor(getHighlightingBackgroundColor());
int endPos = Math.min(markStart + markLen, length);
final int endX = x + context.getStringWidth(str, offset + markStart, endPos - markStart);
context.fillRectangle(x, y - context.getStringHeight(), endX - 1, y + context.getDescent());
context.setTextColor(getHighlightingForegroundColor());
context.drawString(x, y, str, offset + markStart, endPos - markStart);
x = endX;
if (pos < length) {
LogUtil.i10("drawString");
context.setTextColor(color);
context.drawString(x, y, str, offset + pos, length - pos);
代码示例来源:origin: Jiangzqts/EpubRead
public static void draw(ZLPaintContext context, Which which, int x, int y, ZLColor color) {
context.setFillColor(color);
final int dpi = ZLibrary.Instance().getDisplayDPI();
final int unit = dpi / 160;
final int xCenter = which == Which.Left ? x - unit - 1 : x + unit + 1;
context.fillRectangle(xCenter - unit, y + dpi / 10, xCenter + unit, y - dpi / 10);
if (which == Which.Left) {
context.fillCircle(xCenter, y - dpi / 10, unit * 4);
} else {
context.fillCircle(xCenter, y + dpi / 10, unit * 4);
}
}
}
代码示例来源:origin: ydcx/KooReader
public final int getCharHeight(char chr) {
final Integer h = myCharHeights.get(chr);
if (h != null) {
return h;
}
final int he = getCharHeightInternal(chr);
myCharHeights.put(chr, he);
return he;
}
代码示例来源:origin: ydcx/KooReader
} else if (element instanceof ZLTextImageElement) {
final ZLTextImageElement imageElement = (ZLTextImageElement) element;
context.drawImage(
areaX, areaY,
imageElement.ImageData,
context.setLineColor(getTextColor(ZLTextHyperlink.NO_LINK));
context.setFillColor(new ZLColor(127, 127, 127));
final int xStart = area.XStart + 10;
final int xEnd = area.XEnd - 10;
final int yStart = area.YStart + 10;
final int yEnd = area.YEnd - 10;
context.fillRectangle(xStart, yStart, xEnd, yEnd);
context.drawLine(xStart, yStart, xStart, yEnd);
context.drawLine(xStart, yEnd, xEnd, yEnd);
context.drawLine(xEnd, yEnd, xEnd, yStart);
context.drawLine(xEnd, yStart, xStart, yStart);
final int l = xStart + (xEnd - xStart) * 7 / 16;
final int r = xStart + (xEnd - xStart) * 10 / 16;
final int b = yStart + (yEnd - yStart) * 4 / 6;
final int c = yStart + (yEnd - yStart) / 2;
context.setFillColor(new ZLColor(196, 196, 196));
context.fillPolygon(new int[]{l, l, r}, new int[]{t, b, c});
} else if (element instanceof ExtensionElement) {
((ExtensionElement) element).draw(context, area);
} else if (element == ZLTextElement.HSpace || element == ZLTextElement.NBSpace) {
final int cw = context.getSpaceWidth();
for (int len = 0; len < area.XEnd - area.XStart; len += cw) {
代码示例来源:origin: Jiangzqts/EpubRead
context.setLineColor(color);
context.setFillColor(color, 0x33);
final int xStart = area.XStart + hMargin;
final int xEnd = area.XEnd - hMargin;
final int yStart = area.YStart + vMargin;
final int yEnd = area.YEnd - vMargin;
context.fillRectangle(xStart, yStart, xEnd, yEnd);
context.drawLine(xStart, yStart, xStart, yEnd);
context.drawLine(xStart, yEnd, xEnd, yEnd);
context.drawLine(xEnd, yEnd, xEnd, yStart);
context.drawLine(xEnd, yStart, xStart, yStart);
代码示例来源:origin: ydcx/KooReader
final ZLFile wallpaper = getWallpaperFile(); // 获取背景图片
if (wallpaper != null) {
context.clear(wallpaper, getFillMode());
} else {
context.clear(getBackgroundColor());
context.setFillColor(bgColor, 128);
mode |= Hull.DrawMode.Fill;
context.setLineColor(outlineColor);
mode |= Hull.DrawMode.Outline;
context.setLineColor(getSelectionBackgroundColor());
outlinedElementRegion.hull().draw(context, Hull.DrawMode.Outline);
drawSelectionCursor(context, page, SelectionCursor.Which.Right);
context.drawFooter(buildTimeString(), pagePositionPecReal(page));
代码示例来源:origin: Jiangzqts/EpubRead
context.fillPolygon(xs, ys);
context.drawOutline(xs, ys);
代码示例来源:origin: ydcx/KooReader
abstract public void drawString(int x, int y, char[] string, int offset, int length);
代码示例来源:origin: Jiangzqts/EpubRead
} else if (element instanceof ZLTextImageElement) {
final ZLTextImageElement imageElement = (ZLTextImageElement) element;
context.drawImage(
areaX, areaY,
imageElement.ImageData,
context.setLineColor(getTextColor(ZLTextHyperlink.NO_LINK));
context.setFillColor(new ZLColor(127, 127, 127));
final int xStart = area.XStart + 10;
final int xEnd = area.XEnd - 10;
final int yStart = area.YStart + 10;
final int yEnd = area.YEnd - 10;
context.fillRectangle(xStart, yStart, xEnd, yEnd);
context.drawLine(xStart, yStart, xStart, yEnd);
context.drawLine(xStart, yEnd, xEnd, yEnd);
context.drawLine(xEnd, yEnd, xEnd, yStart);
context.drawLine(xEnd, yStart, xStart, yStart);
final int l = xStart + (xEnd - xStart) * 7 / 16;
final int r = xStart + (xEnd - xStart) * 10 / 16;
final int b = yStart + (yEnd - yStart) * 4 / 6;
final int c = yStart + (yEnd - yStart) / 2;
context.setFillColor(new ZLColor(196, 196, 196));
context.fillPolygon(new int[]{l, l, r}, new int[]{t, b, c});
} else if (element instanceof ExtensionElement) {
((ExtensionElement) element).draw(context, area);
} else if (element == ZLTextElement.HSpace || element == ZLTextElement.NBSpace) {
final int cw = context.getSpaceWidth();
for (int len = 0; len < area.XEnd - area.XStart; len += cw) {
代码示例来源:origin: ydcx/KooReader
context.setLineColor(color);
context.setFillColor(color, 0x33);
final int xStart = area.XStart + hMargin;
final int xEnd = area.XEnd - hMargin;
final int yStart = area.YStart + vMargin;
final int yEnd = area.YEnd - vMargin;
context.fillRectangle(xStart, yStart, xEnd, yEnd);
context.drawLine(xStart, yStart, xStart, yEnd);
context.drawLine(xStart, yEnd, xEnd, yEnd);
context.drawLine(xEnd, yEnd, xEnd, yStart);
context.drawLine(xEnd, yStart, xStart, yStart);
代码示例来源:origin: Jiangzqts/EpubRead
final ZLFile wallpaper = getWallpaperFile(); // 获取背景图片
if (wallpaper != null) {
context.clear(wallpaper, getFillMode());
} else {
context.clear(getBackgroundColor());
context.setFillColor(bgColor, 128);
mode |= Hull.DrawMode.Fill;
context.setLineColor(outlineColor);
mode |= Hull.DrawMode.Outline;
context.setLineColor(getSelectionBackgroundColor());
outlinedElementRegion.hull().draw(context, Hull.DrawMode.Outline);
drawSelectionCursor(context, page, SelectionCursor.Which.Right);
context.drawFooter(buildTimeString(), pagePositionPecReal(page));
代码示例来源:origin: ydcx/KooReader
context.fillPolygon(xs, ys);
context.drawOutline(xs, ys);
代码示例来源:origin: Jiangzqts/EpubRead
abstract public void drawString(int x, int y, char[] string, int offset, int length);
代码示例来源:origin: ydcx/KooReader
private final void drawString(ZLPaintContext context, int x, int y, char[] str, int offset, int length, ZLTextWord.Mark mark, ZLColor color, int shift) {
if (mark == null) {
context.setTextColor(color);
context.drawString(x, y, str, offset, length);
} else {
LogUtil.i10("drawString");
context.setTextColor(color);
context.drawString(x, y, str, offset + pos, endPos - pos);
x += context.getStringWidth(str, offset + pos, endPos - pos);
context.setFillColor(getHighlightingBackgroundColor());
int endPos = Math.min(markStart + markLen, length);
final int endX = x + context.getStringWidth(str, offset + markStart, endPos - markStart);
context.fillRectangle(x, y - context.getStringHeight(), endX - 1, y + context.getDescent());
context.setTextColor(getHighlightingForegroundColor());
context.drawString(x, y, str, offset + markStart, endPos - markStart);
x = endX;
if (pos < length) {
LogUtil.i10("drawString");
context.setTextColor(color);
context.drawString(x, y, str, offset + pos, length - pos);
代码示例来源:origin: ydcx/KooReader
public static void draw(ZLPaintContext context, Which which, int x, int y, ZLColor color) {
context.setFillColor(color);
final int dpi = ZLibrary.Instance().getDisplayDPI();
final int unit = dpi / 160;
final int xCenter = which == Which.Left ? x - unit - 1 : x + unit + 1;
context.fillRectangle(xCenter - unit, y + dpi / 10, xCenter + unit, y - dpi / 10);
if (which == Which.Left) {
context.fillCircle(xCenter, y - dpi / 10, unit * 4);
} else {
context.fillCircle(xCenter, y + dpi / 10, unit * 4);
}
}
}
代码示例来源:origin: Jiangzqts/EpubRead
public final int getCharHeight(char chr) {
final Integer h = myCharHeights.get(chr);
if (h != null) {
return h;
}
final int he = getCharHeightInternal(chr);
myCharHeights.put(chr, he);
return he;
}
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextView类的一些代码示例,展示了ZLTextView类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextTraverser类的一些代码示例,展示了ZLTextTraverser类的具体用法。这些代码示例主要来
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextSelection类的一些代码示例,展示了ZLTextSelection类的具体用法。这些代码示例主要来
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextStyle类的一些代码示例,展示了ZLTextStyle类的具体用法。这些代码示例主要来源于Github
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextPosition类的一些代码示例,展示了ZLTextPosition类的具体用法。这些代码示例主要来源于
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextRegion类的一些代码示例,展示了ZLTextRegion类的具体用法。这些代码示例主要来源于Gith
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextLineInfo类的一些代码示例,展示了ZLTextLineInfo类的具体用法。这些代码示例主要来源于
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextManualHighlighting类的一些代码示例,展示了ZLTextManualHighlighti
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextParagraphCursor类的一些代码示例,展示了ZLTextParagraphCursor类的具体
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextPage类的一些代码示例,展示了ZLTextPage类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextHighlighting类的一些代码示例,展示了ZLTextHighlighting类的具体用法。这些代
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextImageRegionSoul类的一些代码示例,展示了ZLTextImageRegionSoul类的具体
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextFixedHSpaceElement类的一些代码示例,展示了ZLTextFixedHSpaceEleme
本文整理了Java中com.koolearn.klibrary.text.view.ZLTextElementAreaVector类的一些代码示例,展示了ZLTextElementAreaVector
本文整理了Java中com.koolearn.klibrary.text.model.ZLTextMark类的一些代码示例,展示了ZLTextMark类的具体用法。这些代码示例主要来源于Github/
本文整理了Java中com.koolearn.klibrary.text.model.ZLTextModel类的一些代码示例,展示了ZLTextModel类的具体用法。这些代码示例主要来源于Githu
本文整理了Java中com.koolearn.klibrary.core.view.ZLViewWidget类的一些代码示例,展示了ZLViewWidget类的具体用法。这些代码示例主要来源于Gith
本文整理了Java中com.koolearn.klibrary.text.model.ZLTextSpecialParagraphImpl类的一些代码示例,展示了ZLTextSpecialParagr
本文整理了Java中com.koolearn.klibrary.text.model.ZLTextStyleEntry类的一些代码示例,展示了ZLTextStyleEntry类的具体用法。这些代码示例
本文整理了Java中com.koolearn.klibrary.core.view.ZLView类的一些代码示例,展示了ZLView类的具体用法。这些代码示例主要来源于Github/Stackover
我是一名优秀的程序员,十分优秀!