Struct vega_lite_4::ProjectionBuilder
source · pub struct ProjectionBuilder { /* private fields */ }
Expand description
Builder for Projection
.
Implementations§
source§impl ProjectionBuilder
impl ProjectionBuilder
sourcepub fn center<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
pub fn center<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
The projection’s center, a two-element array of longitude and latitude in degrees.
Default value: [0, 0]
sourcepub fn clip_angle<VALUE: Into<RemovableValue<f64>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn clip_angle<VALUE: Into<RemovableValue<f64>>>( &mut self, value: VALUE ) -> &mut Self
The projection’s clipping circle radius to the specified angle in degrees. If null
,
switches to antimeridian cutting rather than
small-circle clipping.
sourcepub fn clip_extent<VALUE: Into<RemovableValue<Vec<Vec<f64>>>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn clip_extent<VALUE: Into<RemovableValue<Vec<Vec<f64>>>>>( &mut self, value: VALUE ) -> &mut Self
The projection’s viewport clip extent to the specified bounds in pixels. The extent
bounds are specified as an array [[x0, y0], [x1, y1]]
, where x0
is the left-side of
the viewport, y0
is the top, x1
is the right and y1
is the bottom. If null
, no
viewport clipping is performed.
pub fn coefficient<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn distance<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn extent<VALUE: Into<Vec<Vec<f64>>>>(&mut self, value: VALUE) -> &mut Self
pub fn fit<VALUE: Into<Value>>(&mut self, value: VALUE) -> &mut Self
pub fn fraction<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn lobes<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn parallel<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
sourcepub fn parallels<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
pub fn parallels<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
For conic projections, the two standard parallels that define the map layout. The default depends on the specific conic projection used.
sourcepub fn point_radius<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn point_radius<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The default radius (in pixels) to use when drawing GeoJSON Point
and MultiPoint
geometries. This parameter sets a constant default value. To modify the point radius in
response to data, see the corresponding parameter of the GeoPath and GeoShape
transforms.
Default value: 4.5
sourcepub fn precision<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn precision<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The threshold for the projection’s adaptive
resampling to the specified value in pixels. This
value corresponds to the Douglas–Peucker
distance.
If precision is not specified, returns the projection’s current resampling precision
which defaults to √0.5 ≅ 0.70710…
.
pub fn radius<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn ratio<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn reflect_x<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn reflect_y<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
sourcepub fn rotate<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
pub fn rotate<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
The projection’s three-axis rotation to the specified angles, which must be a two- or
three-element array of numbers [lambda
, phi
, gamma
] specifying the rotation angles
in degrees about each spherical axis. (These correspond to yaw, pitch and roll.)
Default value: [0, 0, 0]
sourcepub fn scale<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn scale<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The projection’s scale (zoom) factor, overriding automatic fitting. The default scale is projection-specific. The scale factor corresponds linearly to the distance between projected points; however, scale factor values are not equivalent across projections.
pub fn size<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
pub fn spacing<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn tilt<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
sourcepub fn translate<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
pub fn translate<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
The projection’s translation offset as a two-element array [tx, ty]
.
sourcepub fn projection_type<VALUE: Into<ProjectionType>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn projection_type<VALUE: Into<ProjectionType>>( &mut self, value: VALUE ) -> &mut Self
The cartographic projection to use. This value is case-insensitive, for example
"albers"
and "Albers"
indicate the same projection type. You can find all valid
projection types in the
documentation.
Default value: mercator
sourcepub fn build(&self) -> Result<Projection, ProjectionBuilderError>
pub fn build(&self) -> Result<Projection, ProjectionBuilderError>
Trait Implementations§
source§impl Clone for ProjectionBuilder
impl Clone for ProjectionBuilder
source§fn clone(&self) -> ProjectionBuilder
fn clone(&self) -> ProjectionBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more