/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use euclid::{Point2D, Size2D}; use servo::webrender_api::units::DevicePixel; use winit::dpi::{PhysicalPosition, PhysicalSize}; pub fn winit_size_to_euclid_size(size: PhysicalSize) -> Size2D { Size2D::new(size.width, size.height) } pub fn winit_position_to_euclid_point(position: PhysicalPosition) -> Point2D { Point2D::new(position.x, position.y) }