remove remainds

This commit is contained in:
Sebastian K 2020-07-07 21:23:11 +03:00
parent 7815047329
commit bff7111310
3 changed files with 1 additions and 23 deletions

View File

@ -806,11 +806,6 @@ impl Path2D {
self.current_contour = last_contour.unwrap_or_else(Contour::new);
}
#[inline]
pub fn mirror_and_close_last(&mut self) {
self.current_contour.mirror_and_close();
}
pub fn into_outline(mut self) -> Outline {
self.flush_current_contour();
self.outline

View File

@ -21,7 +21,6 @@ use pathfinder_geometry::transform2d::{Transform2F, Matrix2x2F};
use pathfinder_geometry::transform3d::Perspective;
use pathfinder_geometry::unit_vector::UnitVector;
use pathfinder_geometry::vector::{Vector2F, vec2f};
use pathfinder_geometry::util::{reflection};
use std::f32::consts::PI;
use std::fmt::{self, Debug, Formatter};
use std::mem;
@ -603,7 +602,7 @@ impl Contour {
if r.x().is_finite() & r.y().is_finite() {
let r = r.abs();
let r_inv = r.inv();
let r_inv = r.recip();
let sign = match (large_arc, direction) {
(false, ArcDirection::CW) | (true, ArcDirection::CCW) => 1.0,
(false, ArcDirection::CCW) | (true, ArcDirection::CW) => -1.0

View File

@ -11,8 +11,6 @@
//! Various utilities.
use std::f32;
use crate::transform2d::{Transform2F, Matrix2x2F};
use crate::vector::Vector2F;
pub const EPSILON: f32 = 0.001;
@ -39,17 +37,3 @@ pub fn clamp(x: f32, min_val: f32, max_val: f32) -> f32 {
pub fn alignup_i32(a: i32, b: i32) -> i32 {
(a + b - 1) / b
}
pub fn reflection(a: Vector2F, b: Vector2F) -> Transform2F {
let l = b - a;
let l2 = l * l;
let l2_yx = l2.yx();
let d = l2 - l2_yx;
let lxy2 = 2.0 * l.x() * l.y();
let s = 1.0 / (l2.x() + l2.y());
Transform2F::from_translation(-a) * Transform2F {
matrix: Matrix2x2F::row_major(d.x(), lxy2, lxy2, d.y()).scale(s),
vector: a
}
}