private void UpdateCentering() { if (horizontalOrigin == HorizontalAlign.Left) { Origin.X = 0; } else if (horizontalOrigin == HorizontalAlign.Center) { Origin.X = size.X / 2; } else { Origin.X = size.X; } if (verticalOrigin == VerticalAlign.Top) { Origin.Y = 0; } else if (verticalOrigin == VerticalAlign.Center) { Origin.Y = size.Y / 2; } else { Origin.Y = size.Y; } Origin = Origin.Floor(); }