Skip to content

Commit aefd3a5

Browse files
committed
Doc fixes and improvements.
1 parent 5b4da31 commit aefd3a5

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

algorithms/src/splitter.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// Split paths with a line or line segment.
2+
13
use math::*;
24
use geom::{Line, LineSegment};
35
use std::cmp::PartialOrd;
@@ -16,7 +18,10 @@ struct IntersectingEdge {
1618
positive: bool,
1719
}
1820

19-
/// A context object that can split the sub paths of `AdvancedPath`.
21+
/// A context object that can split paths.
22+
///
23+
/// When splitting several paths, reusing the `Splitter` object can improve performance
24+
/// by reusing memory allocations.
2025
pub struct Splitter {
2126
intersecting_edges: Vec<IntersectingEdge>,
2227
point_buffer: Vec<Point>,

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![doc(html_logo_url = "https://nical.github.io/lyon-doc/lyon-logo.svg")]
22
#![deny(bare_trait_objects)]
33

4-
//! 2d rendering on the GPU in rust.
4+
//! GPU-based 2D graphics rendering tools in Rust using path tessellation.
55
//!
66
//! ![logo](https://nical.github.io/lyon-doc/lyon-logo.svg)
77
//!

tessellation/src/geometry_builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ impl<VertexType, IndexType> VertexBuffers<VertexType, IndexType> {
315315
/// `BuffersBuilders` record the vertex offset from when they are created so that algorithms using
316316
/// them don't need to worry about offsetting indices if some geometry was added beforehand. This
317317
/// means that from the point of view of a `BuffersBuilder` user, the first added vertex is at always
318-
/// offset at the offset 0 and `VertexBuilfer` takes care of translating indices adequately.
318+
/// offset at the offset 0 and `VertexBuilder` takes care of translating indices adequately.
319319
///
320320
/// Often, algorithms are built to generate vertex positions without knowledge of eventual other
321321
/// vertex attributes. The `VertexConstructor` does the translation from generic `Input` to `VertexType`.

tessellation/src/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ pub enum TessellationError {
232232
Internal(InternalError)
233233
}
234234

235+
/// Something unexpectedly put the tessellator in a bad state.
236+
///
237+
/// If you run into this error code, please [file an issue](https://github.com/nical/lyon/issues).
235238
#[derive(Clone, Debug, PartialEq)]
236239
pub enum InternalError {
237240
E01,

0 commit comments

Comments
 (0)