Add temporal custom table column for gradients#4080
Add temporal custom table column for gradients#4080YohYamasaki wants to merge 5 commits intoGraphiteEditor:masterfrom
Conversation
* Add SVG and Vello renderers for Table<GradientStops> * Add thumbnail rendering for Table<GradientStops> * Use row transform to map (0,0), (1,0) unit line to document space * Set 100px width for the initially created gradient * Add support of table gradients for the gradient tool
* Thumbnail rendering of artboard with infinite gradient layer * Hide radial gradient's reverse direction button for gradient table * Remove unused imports
* Add HashMap<String, Vec<CustomColumnValue>> to Table * Store gradient type and spread method as custom columns via extension traits for Table<GradientStops> * Support gradient type and spread method in SVG and Vello renderers for Table<GradientStops>
There was a problem hiding this comment.
Code Review
This pull request introduces support for Table<GradientStops>, enabling gradients to be managed as table data. It adds an additional metadata field to Table and TableRow to store properties like gradient type and spread method, which are now integrated into the data panel and rendering engines. The Vello renderer was updated to handle infinite gradients via manual transform encoding, and a new thumbnail_bounding_box method was added to the BoundingBox trait. A code suggestion was provided to simplify the retrieval of custom column values in the data panel.
| ]; | ||
|
|
||
| for key in &additional_keys { | ||
| let value = *(row.additional.get(key).unwrap_or(&&CustomColumnValue::None)); |
There was a problem hiding this comment.
Using unwrap_or with a reference to a reference (&&CustomColumnValue::None) is unnecessary and can be simplified to unwrap_or(&CustomColumnValue::None).
| let value = *(row.additional.get(key).unwrap_or(&&CustomColumnValue::None)); | |
| let value = row.additional.get(key).unwrap_or(&CustomColumnValue::None); |
|
Superseded by my changes to #3989. |
No description provided.