/// <summary> /// Rebuilds the editor display using the provided size and color keys. /// </summary> /// <param name="keys">Set of keys to initially display on the editor.</param> /// <param name="width">Width of the editor in pixels.</param> /// <param name="height">Height of the editor in pixels.</param> private void Rebuild(List <ColorGradientKey> keys, int width, int height) { this.width = width; this.height = height; canvas.SetWidth(width); canvas.SetHeight(height); Rebuild(keys); }
/// <summary> /// Sets the physical size onto which to draw the value display. /// </summary> /// <param name="width">Width in pixels.</param> /// <param name="height">Height in pixels.</param> public void SetSize(int width, int height) { this.width = width; this.height = height; canvas.SetWidth(width); canvas.SetHeight(height); tickHandler.SetRange(rangeStart, rangeEnd, height); }
/// <summary> /// Sets the physical size onto which to draw the timeline. /// </summary> /// <param name="width">Width in pixels.</param> /// <param name="height">Height in pixels.</param> public void SetSize(int width, int height) { this.width = width; this.height = height; canvas.SetWidth(width); canvas.SetHeight(height); drawableWidth = Math.Max(0, width - PADDING * 2); }