下面列出了java.awt.font.GlyphVector#FLAG_RUN_RTL 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}
public StandardGlyphVector createGlyphVector(Font font, FontRenderContext frc, StandardGlyphVector result) {
// !!! default initialization until we let layout engines do it
if (_flags == UNINITIALIZED_FLAGS) {
_flags = 0;
if (_count > 1) { // if only 1 glyph assume LTR
boolean ltr = true;
boolean rtl = true;
int rtlix = _count; // rtl index
for (int i = 0; i < _count && (ltr || rtl); ++i) {
int cx = _indices[i];
ltr = ltr && (cx == i);
rtl = rtl && (cx == --rtlix);
}
if (rtl) _flags |= GlyphVector.FLAG_RUN_RTL;
if (!rtl && !ltr) _flags |= GlyphVector.FLAG_COMPLEX_GLYPHS;
}
// !!! layout engines need to tell us whether they performed
// position adjustments. currently they don't tell us, so
// we must assume they did
_flags |= GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS;
}
int[] glyphs = new int[_count];
System.arraycopy(_glyphs, 0, glyphs, 0, _count);
float[] positions = null;
if ((_flags & GlyphVector.FLAG_HAS_POSITION_ADJUSTMENTS) != 0) {
positions = new float[_count * 2 + 2];
System.arraycopy(_positions, 0, positions, 0, positions.length);
}
int[] indices = null;
if ((_flags & GlyphVector.FLAG_COMPLEX_GLYPHS) != 0) {
indices = new int[_count];
System.arraycopy(_indices, 0, indices, 0, _count);
}
if (result == null) {
result = new StandardGlyphVector(font, frc, glyphs, positions, indices, _flags);
} else {
result.initGlyphVector(font, frc, glyphs, positions, indices, _flags);
}
return result;
}