[][src]Struct widgetry::drawing::GfxCtx

pub struct GfxCtx<'a> {
    pub(crate) inner: GfxCtxInnards<'a>,
    uniforms: Uniforms,
    screencap_mode: bool,
    pub(crate) naming_hint: Option<String>,
    pub canvas: &'a Canvas,
    pub prerender: &'a Prerender,
    style: &'a Style,
    pub(crate) num_draw_calls: usize,
    pub(crate) num_forks: usize,
}

Fields

inner: GfxCtxInnards<'a>uniforms: Uniformsscreencap_mode: boolnaming_hint: Option<String>canvas: &'a Canvasprerender: &'a Prerenderstyle: &'a Stylenum_draw_calls: usizenum_forks: usize

Implementations

impl<'a> GfxCtx<'a>[src]

pub(crate) fn new(
    prerender: &'a Prerender,
    canvas: &'a Canvas,
    style: &'a Style,
    screencap_mode: bool
) -> GfxCtx<'a>
[src]

pub fn fork(
    &mut self,
    top_left_map: Pt2D,
    top_left_screen: ScreenPt,
    zoom: f64,
    z: Option<f32>
)
[src]

pub fn fork_screenspace(&mut self)[src]

pub fn unfork(&mut self)[src]

pub fn clear(&mut self, color: Color)[src]

pub fn draw_polygon(&mut self, color: Color, poly: Polygon)[src]

pub fn redraw(&mut self, obj: &Drawable)[src]

pub fn redraw_at(&mut self, top_left: ScreenPt, obj: &Drawable)[src]

pub fn enable_clipping(&mut self, rect: ScreenRectangle)[src]

pub fn disable_clipping(&mut self)[src]

pub fn draw_mouse_tooltip(&mut self, txt: Text)[src]

pub fn get_screen_bounds(&self) -> Bounds[src]

pub fn screen_to_map(&self, pt: ScreenPt) -> Pt2D[src]

pub fn get_cursor_in_map_space(&self) -> Option<Pt2D>[src]

pub(crate) fn get_num_uploads(&self) -> usize[src]

pub fn is_screencap(&self) -> bool[src]

pub fn set_screencap_naming_hint(&mut self, hint: String)[src]

pub fn upload(&mut self, batch: GeomBatch) -> Drawable[src]

pub fn default_line_height(&self) -> f64[src]

pub fn style(&self) -> &Style[src]

Trait Implementations

impl<'_> AsRef<Assets> for GfxCtx<'_>[src]

impl<'_> AsRef<Prerender> for GfxCtx<'_>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for GfxCtx<'a>

impl<'a> !Send for GfxCtx<'a>

impl<'a> !Sync for GfxCtx<'a>

impl<'a> Unpin for GfxCtx<'a>

impl<'a> !UnwindSafe for GfxCtx<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,