Here is the problem. I try to build chart control. And i want to calculate coordinates for data values via some calculator class.
Lets assume i have a canvas with height = 35. If move mouse vertically, mouse move events will bring in position all the values 0, 1, 2 ... 35. So It seems that there are 36 pixels between edges. Is this correct ?
Because i thought that actual amount of pixels is 35, because indexes are from 0 to n-1.
So the question is, during calculation in calculator class, do i need to consider n-1 (subtract 1 from actual size of the panel)
Aucun commentaire:
Enregistrer un commentaire