[−][src]Struct cat_engine::WindowBase
Окно, включает в себя графические функции. A window with graphic functions included.
Fields
display: Display
graphics: Graphics2D
event_loop: EventLoop<E>
frames_passed: u32
feature = "fps_counter"
time: Instant
feature = "fps_counter"
alpha_channel: f32
feature = "alpha_smoothing"
smooth: f32
feature = "alpha_smoothing"
mouse_icon: MouseCursorIcon
feature = "mouse_cursor_icon"
Implementations
impl<E: 'static> WindowBase<E>
[src]
pub fn raw(
window_builder: WindowBuilder,
context_builder: ContextBuilder<NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<E>,
initial_colour: Option<Colour>,
mouse_cursor_icon_settings: MouseCursorIconSettings<PathBuf>
) -> Result<WindowBase<E>, DisplayCreationError>
[src]
window_builder: WindowBuilder,
context_builder: ContextBuilder<NotCurrent>,
graphics_settings: GraphicsSettings,
event_loop: EventLoop<E>,
initial_colour: Option<Colour>,
mouse_cursor_icon_settings: MouseCursorIconSettings<PathBuf>
) -> Result<WindowBase<E>, DisplayCreationError>
impl<E: 'static> WindowBase<E>
[src]
Функции для рисования. Drawing functions.
pub fn draw_raw<F: FnOnce(&mut DrawParameters, &mut Frame)>(
&self,
f: F
) -> Result<(), SwapBuffersError>
[src]
&self,
f: F
) -> Result<(), SwapBuffersError>
Даёт прямое управление над кадром.
Gives frame to raw drawing.
pub fn draw<F: FnOnce(&mut DrawParameters, &mut Graphics)>(
&self,
f: F
) -> Result<(), SwapBuffersError>
[src]
&self,
f: F
) -> Result<(), SwapBuffersError>
Выполняет замыкание (и рисует курсор, если feature = "mouse_cursor_icon"
).
Executes the closure (and draws the mouse cursor if feature = "mouse_cursor_icon"
).
pub fn draw_smooth<F: FnOnce(f32, &mut DrawParameters, &mut Graphics)>(
&mut self,
f: F
) -> Result<f32, SwapBuffersError>
[src]
&mut self,
f: F
) -> Result<f32, SwapBuffersError>
Выполняет замыкание (и рисует курсор, если feature = "mouse_cursor_icon"
).
Выдаёт альфа-канал, возвращает его следующее значение.
Нужна для рисования с изменяющимся альфа-канала.
Executes closure (and draws the mouse cursor if feature = "mouse_cursor_icon"
).
Gives alpha channel, returns it's next value.
Needed for drawing with changing alpha channel.
feature = "alpha_smoothing"
impl<E: 'static> WindowBase<E>
[src]
pub fn set_user_cursor_visible(&mut self, visible: bool)
[src]
feature = "mouse_cursor_icon
pub fn switch_cursor_visibility(&mut self)
[src]
feature = "mouse_cursor_icon
pub fn screenshot(&self) -> Option<DynamicImage>
[src]
Возвращает скриншот.
Returns a screenshot.
pub fn save_screenshot<P: AsRef<Path>>(&self, path: P)
[src]
Сохраняет скриншот в формате png.
Saves a screenshot in png format.
impl<E: 'static> WindowBase<E>
[src]
pub fn set_alpha(&mut self, alpha: f32)
[src]
Sets alpha channel for smooth drawing.
pub fn set_smooth(&mut self, smooth: f32)
[src]
Sets smooth for smooth drawing.
pub fn set_new_smooth(&mut self, smooth: f32)
[src]
Sets smooth and zero alpha channel for smooth drawing.
Auto Trait Implementations
impl<E> !RefUnwindSafe for WindowBase<E>
impl<E> !Send for WindowBase<E>
impl<E> !Sync for WindowBase<E>
impl<E> Unpin for WindowBase<E> where
E: Unpin,
E: Unpin,
impl<E> !UnwindSafe for WindowBase<E>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,