boolean horiz = !isVertical();
if (charix == -1 || charix == characterCount) {
// !!! note: want non-shifted, baseline ascent and descent here!
// TextLine should return appropriate line metrics object for these values
TextLineMetrics m = textLine.getMetrics();
boolean low = ltr == (charix == -1);
iangle = 0;
if (horiz) {
p1x = p2x = low ? 0 : m.advance;
p1y = -m.ascent;
p2y = m.descent;
} else {
p1y = p2y = low ? 0 : m.advance;
p1x = m.descent;
p2x = m.ascent;
}
} else {
CoreMetrics thiscm = textLine.getCoreMetricsAt(charix);
iangle = thiscm.italicAngle;
ixbase = textLine.getCharLinePosition(charix, lead);
if (thiscm.baselineIndex < 0) {
// this is a graphic, no italics, use entire line height for caret
TextLineMetrics m = textLine.getMetrics();
if (horiz) {
p1x = p2x = ixbase;
if (thiscm.baselineIndex == GraphicAttribute.TOP_ALIGNMENT) {
p1y = -m.ascent;
p2y = p1y + thiscm.height;