public float TimeToPixel(float time, Rect rect) { return ((((time - this.shownArea.x) / this.shownArea.width) * rect.width) + rect.x); }