Auto merge of #495 - 5225225:docs-errors, r=jdm

Fix links in docs, fix/ignore some doctests

None
This commit is contained in:
bors-servo 2022-03-27 23:36:08 -04:00 committed by GitHub
commit d7ede79afd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 9 deletions

View File

@ -32,10 +32,10 @@ impl<'a> OutlineDash<'a> {
///
/// * `dashes`: The list of dashes, specified as alternating pixel lengths of lines and gaps
/// that describe the pattern. See
/// https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash.
/// <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash>.
///
/// * `offset`: The line dash offset, or "phase". See
/// https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset.
/// <https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset>.
#[inline]
pub fn new(input: &'a Outline, dashes: &'a [f32], offset: f32) -> OutlineDash<'a> {
OutlineDash { input, output: Outline::new(), state: DashState::new(dashes, offset) }

View File

@ -16,8 +16,8 @@
/// rule.
#[derive(Clone, Copy, PartialEq, Debug)]
pub enum FillRule {
/// The nonzero rule: https://en.wikipedia.org/wiki/Nonzero-rule
/// The nonzero rule: <https://en.wikipedia.org/wiki/Nonzero-rule>
Winding,
/// The even-odd rule: https://en.wikipedia.org/wiki/Even%E2%80%93odd_rule
/// The even-odd rule: <https://en.wikipedia.org/wiki/Even%E2%80%93odd_rule>
EvenOdd,
}

View File

@ -25,7 +25,13 @@ const TOLERANCE: f32 = 0.01;
///
/// An example of use:
///
/// ```norun
/// ```no_run
/// use pathfinder_content::stroke::OutlineStrokeToFill;
/// use pathfinder_content::stroke::StrokeStyle;
/// use pathfinder_content::outline::Outline;
///
/// let input_outline = Outline::new();
///
/// let mut stroke_to_fill = OutlineStrokeToFill::new(&input_outline, StrokeStyle::default());
/// stroke_to_fill.offset();
/// let output_outline = stroke_to_fill.into_outline();

View File

@ -14,7 +14,7 @@
pub trait Executor {
/// Like the Rayon snippet:
///
/// ```norun
/// ```ignore
/// (0..length).into_par_iter().map(builder).collect()
/// ```
fn build_vector<T, F>(&self, length: usize, builder: F) -> Vec<T>

View File

@ -108,10 +108,9 @@ impl SceneProxy {
///
/// Exactly equivalent to:
///
/// ```norun
/// ```ignore
/// scene_proxy.build(build_options);
/// scene_proxy.render(renderer);
/// }
/// ```
#[inline]
pub fn build_and_render<D>(&mut self, renderer: &mut Renderer<D>, build_options: BuildOptions)

View File

@ -13,7 +13,7 @@
//! We don't render the demo UI text using Pathfinder itself so that we can use the debug UI to
//! debug Pathfinder if it's totally busted.
//!
//! The debug font atlas was generated using: https://evanw.github.io/font-texture-generator/
//! The debug font atlas was generated using: <https://evanw.github.io/font-texture-generator/>
use crate::gpu::options::RendererLevel;
use crate::gpu::perf::{RenderStats, RenderTime};