unvell / ReoGrid

Fast and powerful .NET spreadsheet component, support data format, freeze, outline, formula calculation, chart, script execution and etc. Compatible with Excel 2007 (.xlsx) format and working on .NET 3.5 (or client profile), WPF and Android platform.
https://reogrid.net
MIT License
1.32k stars 390 forks source link

How to know the coordinates of "Graphics. Point" in "RangePosition" or "CellPosition" #523

Closed 1542793315 closed 3 months ago

1542793315 commented 3 months ago

How to know the coordinates of "Graphics. Point" in "RangePosition" or "CellPosition" I need to build the Location of ImageObject

jingwood commented 3 months ago

The worksheet instance has the following methods that might help you.

public Rectangle GetRangePhysicsBounds(RangePosition range)
public Point GetCellPhysicsPosition(int row, int col)

Just notice that the atucal point drawed on screen may not same to the physics position, since worksheet can be frozen, scrolled or zoomed.

1542793315 commented 3 months ago

The worksheet instance has the following methods that might help you.

public Rectangle GetRangePhysicsBounds(RangePosition range)
public Point GetCellPhysicsPosition(int row, int col)

Just notice that the atucal point drawed on screen may not same to the physics position, since worksheet can be frozen, scrolled or zoomed.

Thank you ! I got it !