org.lwjgl.nanovg.NanoVG.nvgTextAlign()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中org.lwjgl.nanovg.NanoVG.nvgTextAlign()方法的一些代码示例,展示了NanoVG.nvgTextAlign()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NanoVG.nvgTextAlign()方法的具体详情如下:
包路径:org.lwjgl.nanovg.NanoVG
类名称:NanoVG
方法名:nvgTextAlign

NanoVG.nvgTextAlign介绍

[英]Sets the text align of current text style.
[中]设置当前文字样式的文字对齐方式。

代码示例

代码示例来源:origin: SpinyOwl/legui

public static void alignTextInBox(long context, HorizontalAlign hAlig, VerticalAlign vAlig) {
  int hAlign = hAlig == HorizontalAlign.CENTER ? NVG_ALIGN_CENTER : hAlig == HorizontalAlign.LEFT ? NVG_ALIGN_LEFT : NVG_ALIGN_RIGHT;
  int vAlign = vAlig == VerticalAlign.TOP ? NVG_ALIGN_TOP : vAlig == VerticalAlign.BOTTOM ?
      NVG_ALIGN_BOTTOM : vAlig == VerticalAlign.MIDDLE ? NVG_ALIGN_MIDDLE : NVG_ALIGN_BASELINE;
  nvgTextAlign(context, hAlign | vAlign);
}

代码示例来源:origin: SpinyOwl/legui

nvgTextAlign(context, nvgHorizontalAlign | nvgVerticalAlign);

代码示例来源:origin: lwjglgamedev/lwjglbook

nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_TOP);
if (hover) {
  nvgFillColor(vg, rgba(0x00, 0x00, 0x00, 255, colour));
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_TOP);
nvgFillColor(vg, rgba(0xe6, 0xea, 0xed, 255, colour));
nvgText(vg, window.getWidth() - 150, window.getHeight() - 95, dateFormat.format(new Date()));

代码示例来源:origin: lwjglgamedev/lwjglbook

nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_TOP);
if (hover) {
  nvgFillColor(vg, rgba(0x00, 0x00, 0x00, 255, colour));
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_TOP);
nvgFillColor(vg, rgba(0xe6, 0xea, 0xed, 255, colour));
nvgText(vg, window.getWidth() - 150, window.getHeight() - 95, dateFormat.format(new Date()));

代码示例来源:origin: lwjglgamedev/lwjglbook

nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_TOP);
if (hover) {
  nvgFillColor(vg, rgba(0x00, 0x00, 0x00, 255, colour));
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_TOP);
nvgFillColor(vg, rgba(0xe6, 0xea, 0xed, 255, colour));
nvgText(vg, window.getWidth() - 150, window.getHeight() - 95, dateFormat.format(new Date()));

代码示例来源:origin: lwjglgamedev/lwjglbook

nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_TOP);
if (hover) {
  nvgFillColor(vg, rgba(0x00, 0x00, 0x00, 255, colour));
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_TOP);
nvgFillColor(vg, rgba(0xe6, 0xea, 0xed, 255, colour));
nvgText(vg, window.getWidth() - 150, window.getHeight() - 95, dateFormat.format(new Date()));

代码示例来源:origin: lwjglgamedev/lwjglbook

nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_TOP);
if (hover) {
  nvgFillColor(vg, rgba(0x00, 0x00, 0x00, 255, colour));
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_TOP);
nvgFillColor(vg, rgba(0xe6, 0xea, 0xed, 255, colour));
nvgText(vg, window.getWidth() - 150, window.getHeight() - 95, dateFormat.format(new Date()));

代码示例来源:origin: lwjglgamedev/lwjglbook

nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_TOP);
if (hover) {
  nvgFillColor(vg, rgba(0x00, 0x00, 0x00, 255, colour));
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_TOP);
nvgFillColor(vg, rgba(0xe6, 0xea, 0xed, 255, colour));
nvgText(vg, window.getWidth() - 150, window.getHeight() - 95, dateFormat.format(new Date()));

代码示例来源:origin: lwjglgamedev/lwjglbook

nvgTextAlign(vg, NVG_ALIGN_CENTER | NVG_ALIGN_TOP);
if (hover) {
  nvgFillColor(vg, rgba(0x00, 0x00, 0x00, 255, colour));
nvgTextAlign(vg, NVG_ALIGN_LEFT | NVG_ALIGN_TOP);
nvgFillColor(vg, rgba(0xe6, 0xea, 0xed, 255, colour));
nvgText(vg, window.getWidth() - 150, window.getHeight() - 95, dateFormat.format(new Date()));

相关文章