Have you drawn the bar at one end of its travel? Or have you drawn it midway? Assuming it is shown at one end of its travel, you know the distance from the cylinder mount to the bar connection point as drawn. Draw the bar in its other position. Measure the distance from the cylinder mount to the bar connection point in the new position. The difference between the two measurements is the stroke of the cylinder. The cylinder connections at each end must be pivoting, not fixed.