InlineText iT = (InlineText)o; iT.setX(iT.getX() + Math.round(result));
InlineText iT = (InlineText)o; iT.setX(iT.getX() + Math.round(result));
public void moveDot(ViewModelInfo pos) { this.dotInfo = pos; if (this.markInfo == null) { this.markInfo = pos; } fireStateChanged(); updateHighlights(); updateSystemSelection(); InlineText iT = this.dotInfo.text; InlineLayoutBox iB = iT.getParent(); adjustVisibility(new Rectangle(iB.getAbsX() + iT.getX(), iB.getAbsY(), 1, iB.getBaseline())); }
public void moveDot(ViewModelInfo pos) { this.dotInfo = pos; if (this.markInfo == null) { this.markInfo = pos; } fireStateChanged(); updateHighlights(); updateSystemSelection(); InlineText iT = this.dotInfo.text; InlineLayoutBox iB = iT.getParent(); adjustVisibility(new Rectangle(iB.getAbsX() + iT.getX(), iB.getAbsY(), 1, iB.getBaseline())); }
float[] positions = _glyphPositions; int y = getParent().getAbsY(); int offset = getParent().getAbsX() + getX();
float[] positions = _glyphPositions; int y = getParent().getAbsY(); int offset = getParent().getAbsX() + getX();
InlineText txt = (InlineText) o; if (txt.getTextNode() != null) { if ((e.getX() >= x + txt.getX() && e.getX() < x + txt.getX() + txt.getWidth()) || containsWholeIlb) { fndTxt = txt; break; } else { if (e.getX() < x + txt.getX()) { for (offset = fndTxt.getStart(); offset < fndTxt.getEnd(); offset++) { int w = getTextWidth(lc, style, txt.substring(fndTxt.getStart(), offset + 1)); if (w + x + fndTxt.getX() > e.getX()) { break;
InlineText txt = (InlineText) o; if (txt.getTextNode() != null) { if ((e.getX() >= x + txt.getX() && e.getX() < x + txt.getX() + txt.getWidth()) || containsWholeIlb) { fndTxt = txt; break; } else { if (e.getX() < x + txt.getX()) { for (offset = fndTxt.getStart(); offset < fndTxt.getEnd(); offset++) { int w = getTextWidth(lc, style, txt.substring(fndTxt.getStart(), offset + 1)); if (w + x + fndTxt.getX() > e.getX()) { break;
glyphVector, inlineText.getSelectionStart(), iB.getAbsX() + inlineText.getX(), iB.getAbsY() + iB.getBaseline()); glyphVector, inlineText.getSelectionEnd() - 1, iB.getAbsX() + inlineText.getX(), iB.getAbsY() + iB.getBaseline()); Graphics2D graphics = getGraphics(); double scaleX = graphics.getTransform().getScaleX(); boolean allSelected = (text.length() == inlineText.getSelectionEnd()-inlineText.getSelectionStart()); int startX = (inlineText.getSelectionStart() == inlineText.getStart())?iB.getAbsX() + inlineText.getX():(int)Math.round(start.x/scaleX); int endX = (allSelected)?startX+inlineText.getWidth():(int)Math.round((end.x + end.width)/scaleX); _graphics.setColor(UIManager.getColor("TextArea.selectionBackground")); // FIXME
glyphVector, inlineText.getSelectionStart(), iB.getAbsX() + inlineText.getX(), iB.getAbsY() + iB.getBaseline()); glyphVector, inlineText.getSelectionEnd() - 1, iB.getAbsX() + inlineText.getX(), iB.getAbsY() + iB.getBaseline()); Graphics2D graphics = getGraphics(); double scaleX = graphics.getTransform().getScaleX(); boolean allSelected = (text.length() == inlineText.getSelectionEnd()-inlineText.getSelectionStart()); int startX = (inlineText.getSelectionStart() == inlineText.getStart())?iB.getAbsX() + inlineText.getX():(int)Math.round(start.x/scaleX); int endX = (allSelected)?startX+inlineText.getWidth():(int)Math.round((end.x + end.width)/scaleX); _graphics.setColor(UIManager.getColor("TextArea.selectionBackground")); // FIXME
private void drawFontMetrics(RenderingContext c, InlineText inlineText) { InlineLayoutBox iB = inlineText.getParent(); String text = inlineText.getSubstring(); setColor(new FSRGBColor(0xFF, 0x33, 0xFF)); FSFontMetrics fm = iB.getStyle().getFSFontMetrics(null); int width = c.getTextRenderer().getWidth( c.getFontContext(), iB.getStyle().getFSFont(c), text); int x = iB.getAbsX() + inlineText.getX(); int y = iB.getAbsY() + iB.getBaseline(); drawLine(x, y, x + width, y); y += (int) Math.ceil(fm.getDescent()); drawLine(x, y, x + width, y); y -= (int) Math.ceil(fm.getDescent()); y -= (int) Math.ceil(fm.getAscent()); drawLine(x, y, x + width, y); }
private void drawFontMetrics(RenderingContext c, InlineText inlineText) { InlineLayoutBox iB = inlineText.getParent(); String text = inlineText.getSubstring(); setColor(new FSRGBColor(0xFF, 0x33, 0xFF)); FSFontMetrics fm = iB.getStyle().getFSFontMetrics(null); int width = c.getTextRenderer().getWidth( c.getFontContext(), iB.getStyle().getFSFont(c), text); int x = iB.getAbsX() + inlineText.getX(); int y = iB.getAbsY() + iB.getBaseline(); drawLine(x, y, x + width, y); y += (int) Math.ceil(fm.getDescent()); drawLine(x, y, x + width, y); y -= (int) Math.ceil(fm.getDescent()); y -= (int) Math.ceil(fm.getAscent()); drawLine(x, y, x + width, y); }
c.getOutputDevice(), glyphVector, iB.getAbsX() + inlineText.getX(), iB.getAbsY() + iB.getBaseline());
c.getOutputDevice(), glyphVector, iB.getAbsX() + inlineText.getX(), iB.getAbsY() + iB.getBaseline());