+20
−0
+24
−32
+1
−1
+1
−1
+1
−1





















This allows the paint server code to be unit tested in later versions. There are some limitations to this refactoring including use of virtual functions instead of casting so we can use templates in renderers. ll SPObjects must implement their virtual functions, so the base classes all return empty objects where possible and this pushed the design in a certain direction for some calls. * Move sp-gradient spread, units and vector to sp-paint-server-data.h * Move mesh gradient patches data from display/drawing-paintserver to sp-paint-server-data * Allow SPPaintServer to be used as a template class in a renderer by providing data from sp-paint-server-data in a consistant way from the base class using virtual functions. * Add getPaintType and enum class to decide what type of paint server we have instead of cast * Add SPGradient virtual for gathering geometric gradient data for Lienar and Radial gradients * Add SPMeshGradient virtual for gathering mesh patches data for the Mesh gradient * Pack gradient geometric data into SPGradientVector and return in getGradientVector * Harmonize const and API between Mesh Gradients and Linear/Radial Gradients * Move add create_drawing_paintserver calls to display/drawing-paintserver in a single call * Remove `mg` MeshGradient pointer from MeshArray and remove back-linking. This indicates bad API design for some of these calls as the functions used mg and had little to do with the MeshArray but for now we just push the MeshGradient object back in as an argument. * Change drawing-paintserver constructors to take paint-server-data objects instead of individual arguments.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。