aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'components/gfx')
-rw-r--r--components/gfx/paint_context.rs8
-rw-r--r--components/gfx/text/glyph.rs8
2 files changed, 8 insertions, 8 deletions
diff --git a/components/gfx/paint_context.rs b/components/gfx/paint_context.rs
index 81cbd806fbc..96de5a82aed 100644
--- a/components/gfx/paint_context.rs
+++ b/components/gfx/paint_context.rs
@@ -29,7 +29,7 @@ use servo_util::geometry::{Au, MAX_RECT};
use servo_util::opts;
use servo_util::range::Range;
use std::default::Default;
-use std::num::{Float, FloatMath, Zero};
+use std::num::{Float, FloatMath};
use std::ptr;
use style::computed_values::border_style;
use sync::Arc;
@@ -666,7 +666,7 @@ impl<'a> PaintContext<'a> {
self.draw_target.set_transform(&current_transform.mul(&Matrix2D::new(0., -1.,
1., 0.,
x, y)));
- Zero::zero()
+ Point2D::zero()
}
SidewaysRight => {
let x = text.baseline_origin.x.to_subpx() as AzFloat;
@@ -674,7 +674,7 @@ impl<'a> PaintContext<'a> {
self.draw_target.set_transform(&current_transform.mul(&Matrix2D::new(0., 1.,
-1., 0.,
x, y)));
- Zero::zero()
+ Point2D::zero()
}
};
@@ -988,7 +988,7 @@ impl ScaledFontExtensionMethods for ScaledFont {
for slice in run.natural_word_slices_in_range(range) {
for (_i, glyph) in slice.glyphs.iter_glyphs_for_char_range(&slice.range) {
let glyph_advance = glyph.advance();
- let glyph_offset = glyph.offset().unwrap_or(Zero::zero());
+ let glyph_offset = glyph.offset().unwrap_or(Point2D::zero());
let azglyph = struct__AzGlyph {
mIndex: glyph.id() as uint32_t,
mPosition: struct__AzPoint {
diff --git a/components/gfx/text/glyph.rs b/components/gfx/text/glyph.rs
index 4f9407f8bbf..981a0f877cc 100644
--- a/components/gfx/text/glyph.rs
+++ b/components/gfx/text/glyph.rs
@@ -7,11 +7,11 @@ use self::GlyphInfo::*;
use servo_util::vec::*;
use servo_util::range;
-use servo_util::range::{Range, RangeIndex, IntRangeIndex, EachIndex};
+use servo_util::range::{Range, RangeIndex, EachIndex};
use servo_util::geometry::Au;
use std::cmp::PartialOrd;
-use std::num::{NumCast, Zero};
+use std::num::NumCast;
use std::mem;
use std::u16;
use std::vec::Vec;
@@ -434,7 +434,7 @@ impl GlyphData {
GlyphData {
id: id,
advance: advance,
- offset: offset.unwrap_or(Zero::zero()),
+ offset: offset.unwrap_or(Point2D::zero()),
is_missing: is_missing,
cluster_start: cluster_start,
ligature_start: ligature_start,
@@ -549,7 +549,7 @@ impl<'a> GlyphStore {
fn glyph_is_compressible(data: &GlyphData) -> bool {
is_simple_glyph_id(data.id)
&& is_simple_advance(data.advance)
- && data.offset.is_zero()
+ && data.offset == Point2D::zero()
&& data.cluster_start // others are stored in detail buffer
}