TextRange TextImplementor.GetBoundedRanges (TextRectangle rect, CoordType coord_type, TextClipType x_clip_type, TextClipType y_clip_type) { Atk.TextRange result = new Atk.TextRange (); // todo return result; }
public void GetRangeExtents (int startOffset, int endOffset, CoordType coordType, out TextRectangle rect) { int length = Text.Length; System.Windows.Rect bounds = peer.GetBoundingRectangle (); rect.X = (int) (bounds.X + (bounds.Width * startOffset) / length); rect.Y = (int) bounds.Y; rect.Height = (int) bounds.Height; rect.Width = (int) (bounds.Width * (endOffset - startOffset)) / length; /* TODO: if (coordType == Atk.CoordType.Window) resource.ConvertCoords (ref rect.X, ref rect.Y, false); */ }
void TextImplementor.GetRangeExtents (int start_offset, int end_offset, CoordType coord_type, out TextRectangle rect) { Atk.TextRectangle result = new Atk.TextRectangle (); var point1 = editor.LocationToPoint (Document.OffsetToLocation (start_offset)); var point2 = editor.LocationToPoint (Document.OffsetToLocation (end_offset)); result.X = System.Math.Min (point2.X, point1.Y); result.Y = System.Math.Min (point2.Y, point1.Y); result.Width = System.Math.Abs (point2.X - point1.X); result.Height = (int)(System.Math.Abs (point2.Y - point1.Y) + editor.LineHeight); rect = result; }
public TextRange GetBoundedRanges (TextRectangle rect, CoordType coordType, TextClipType xClipType, TextClipType yClipType) { Log.Warn ("GetBoundedRanges not implemented"); return new Atk.TextRange (); }