pub struct HDC(/* private fields */);
Available on crate feature
user
only.Expand description
Handle to a device context.
Trait Implementations§
source§impl Handle for HDC
impl Handle for HDC
source§const NULL: Self = _
const NULL: Self = _
Available on crate feature
kernel
only.The null, uninitialized handle; equals to
0
.source§const INVALID: Self = _
const INVALID: Self = _
Available on crate feature
kernel
only.The invalid handle; equals to
-1
. Read moresource§unsafe fn from_ptr(p: *mut c_void) -> Self
unsafe fn from_ptr(p: *mut c_void) -> Self
Available on crate feature
kernel
only.Creates a new handle object by wrapping a pointer. Read more
source§unsafe fn as_mut(&mut self) -> &mut *mut c_void
unsafe fn as_mut(&mut self) -> &mut *mut c_void
Available on crate feature
kernel
only.Returns a mutable reference to the underlying raw pointer. Read more
source§unsafe fn raw_copy(&self) -> Self
unsafe fn raw_copy(&self) -> Self
Available on crate feature
kernel
only.Returns a raw copy of the underlying handle pointer. Read more
source§impl gdi_Hdc for HDC
Available on crate feature gdi
only.
impl gdi_Hdc for HDC
Available on crate feature
gdi
only.source§fn AlphaBlend(
&self,
origin_dest: RECT,
hdc_src: &HDC,
origin_src: RECT,
ftn: &BLENDFUNCTION
) -> SysResult<()>
fn AlphaBlend( &self, origin_dest: RECT, hdc_src: &HDC, origin_src: RECT, ftn: &BLENDFUNCTION ) -> SysResult<()>
AlphaBlend
function.source§fn AngleArc(
&self,
center: POINT,
radius: u32,
start_angle: f32,
sweep_angle: f32
) -> SysResult<()>
fn AngleArc( &self, center: POINT, radius: u32, start_angle: f32, sweep_angle: f32 ) -> SysResult<()>
AngleArc
function.source§fn Arc(
&self,
bound: RECT,
radial_start: POINT,
radial_end: POINT
) -> SysResult<()>
fn Arc( &self, bound: RECT, radial_start: POINT, radial_end: POINT ) -> SysResult<()>
Arc
function.source§fn ArcTo(
&self,
bound: RECT,
radial_start: POINT,
radial_end: POINT
) -> SysResult<()>
fn ArcTo( &self, bound: RECT, radial_start: POINT, radial_end: POINT ) -> SysResult<()>
ArcTo
function.source§fn BitBlt(
&self,
dest_pos: POINT,
sz: SIZE,
hdc_src: &HDC,
src_src: POINT,
rop: ROP
) -> SysResult<()>
fn BitBlt( &self, dest_pos: POINT, sz: SIZE, hdc_src: &HDC, src_src: POINT, rop: ROP ) -> SysResult<()>
BitBlt
function.source§fn Chord(
&self,
bounds: RECT,
start_radial: POINT,
end_radial: POINT
) -> SysResult<()>
fn Chord( &self, bounds: RECT, start_radial: POINT, end_radial: POINT ) -> SysResult<()>
Chord
function.source§fn CloseFigure(&self) -> SysResult<()>
fn CloseFigure(&self) -> SysResult<()>
CloseFigure
function.source§fn CreateCompatibleBitmap(
&self,
cx: i32,
cy: i32
) -> SysResult<DeleteObjectGuard<HBITMAP>>
fn CreateCompatibleBitmap( &self, cx: i32, cy: i32 ) -> SysResult<DeleteObjectGuard<HBITMAP>>
CreateCompatibleBitmap
function.source§fn CreateCompatibleDC(&self) -> SysResult<DeleteDCGuard>
fn CreateCompatibleDC(&self) -> SysResult<DeleteDCGuard>
CreateCompatibleDC
function.source§fn CreateHalftonePalette(&self) -> SysResult<DeleteObjectGuard<HPALETTE>>
fn CreateHalftonePalette(&self) -> SysResult<DeleteObjectGuard<HPALETTE>>
CreateHalftonePalette
function.source§fn FlattenPath(&self) -> SysResult<()>
fn FlattenPath(&self) -> SysResult<()>
FlattenPath
function.source§fn FrameRgn(&self, rgn: &HRGN, brush: &HBRUSH, w: i32, h: i32) -> SysResult<()>
fn FrameRgn(&self, rgn: &HRGN, brush: &HBRUSH, w: i32, h: i32) -> SysResult<()>
FrameRgn
function.source§fn GetBkColor(&self) -> SysResult<COLORREF>
fn GetBkColor(&self) -> SysResult<COLORREF>
GetBkColor
function.source§fn GetDCBrushColor(&self) -> SysResult<COLORREF>
fn GetDCBrushColor(&self) -> SysResult<COLORREF>
GetDCBrushColor
function.source§fn GetDCPenColor(&self) -> SysResult<COLORREF>
fn GetDCPenColor(&self) -> SysResult<COLORREF>
GetDCPenColor
function.source§unsafe fn GetDIBits(
&self,
hbm: &HBITMAP,
first_scan_line: u32,
num_scan_lines: u32,
bmp_data_buf: Option<&mut [u8]>,
bmi: &mut BITMAPINFO,
usage: DIB
) -> SysResult<i32>
unsafe fn GetDIBits( &self, hbm: &HBITMAP, first_scan_line: u32, num_scan_lines: u32, bmp_data_buf: Option<&mut [u8]>, bmi: &mut BITMAPINFO, usage: DIB ) -> SysResult<i32>
source§fn GetDeviceCaps(&self, index: GDC) -> i32
fn GetDeviceCaps(&self, index: GDC) -> i32
GetDeviceCaps
function.source§fn GetStretchBltMode(&self) -> SysResult<STRETCH_MODE>
fn GetStretchBltMode(&self) -> SysResult<STRETCH_MODE>
GetStretchBltMode
function.source§fn GetTextColor(&self) -> SysResult<COLORREF>
fn GetTextColor(&self) -> SysResult<COLORREF>
GetTextColor
function.source§fn GetTextExtentPoint32(&self, text: &str) -> SysResult<SIZE>
fn GetTextExtentPoint32(&self, text: &str) -> SysResult<SIZE>
GetTextExtentPoint32
function.source§fn GetTextFace(&self) -> SysResult<String>
fn GetTextFace(&self) -> SysResult<String>
GetTextFace
function.source§fn GetTextMetrics(&self, tm: &mut TEXTMETRIC) -> SysResult<()>
fn GetTextMetrics(&self, tm: &mut TEXTMETRIC) -> SysResult<()>
GetTextMetrics
function.source§fn GetViewportExtEx(&self) -> SysResult<SIZE>
fn GetViewportExtEx(&self) -> SysResult<SIZE>
GetViewportExtEx
function.source§fn GetViewportOrgEx(&self) -> SysResult<POINT>
fn GetViewportOrgEx(&self) -> SysResult<POINT>
GetViewportOrgEx
function.source§fn GetWindowExtEx(&self) -> SysResult<SIZE>
fn GetWindowExtEx(&self) -> SysResult<SIZE>
GetWindowExtEx
function.source§fn GetWindowOrgEx(&self) -> SysResult<POINT>
fn GetWindowOrgEx(&self) -> SysResult<POINT>
GetWindowOrgEx
function.source§fn HiMetricToPixel(&self, x: i32, y: i32) -> (i32, i32)
fn HiMetricToPixel(&self, x: i32, y: i32) -> (i32, i32)
AtlHiMetricToPixel
function. Read moresource§fn MoveToEx(&self, x: i32, y: i32, pt: Option<&mut POINT>) -> SysResult<()>
fn MoveToEx(&self, x: i32, y: i32, pt: Option<&mut POINT>) -> SysResult<()>
MoveToEx
function.source§fn PathToRegion(&self) -> SysResult<DeleteObjectGuard<HRGN>>
fn PathToRegion(&self) -> SysResult<DeleteObjectGuard<HRGN>>
PathToRegion
function.source§fn PixelToHiMetric(&self, x: i32, y: i32) -> (i32, i32)
fn PixelToHiMetric(&self, x: i32, y: i32) -> (i32, i32)
AtlPixelToHiMetric
function. Read moresource§fn PolyBezier(&self, pts: &[POINT]) -> SysResult<()>
fn PolyBezier(&self, pts: &[POINT]) -> SysResult<()>
PolyBezier
function.source§fn PolyBezierTo(&self, pts: &[POINT]) -> SysResult<()>
fn PolyBezierTo(&self, pts: &[POINT]) -> SysResult<()>
PolyBezierTo
function.source§fn PolylineTo(&self, pts: &[POINT]) -> SysResult<()>
fn PolylineTo(&self, pts: &[POINT]) -> SysResult<()>
PolylineTo
function.source§fn RealizePalette(&self) -> SysResult<u32>
fn RealizePalette(&self) -> SysResult<u32>
RealizePalette
function.source§fn SelectClipPath(&self, mode: RGN) -> SysResult<()>
fn SelectClipPath(&self, mode: RGN) -> SysResult<()>
SelectClipPath
function.source§fn SelectClipRgn(&self, rgn: &HRGN) -> SysResult<REGION>
fn SelectClipRgn(&self, rgn: &HRGN) -> SysResult<REGION>
SelectClipRgn
function.source§fn SelectObject<G>(
&self,
hgdiobj: &G
) -> SysResult<SelectObjectGuard<'_, Self, G>>where
G: GdiObjectSelect,
fn SelectObject<G>(
&self,
hgdiobj: &G
) -> SysResult<SelectObjectGuard<'_, Self, G>>where
G: GdiObjectSelect,
SelectObject
function. Read moresource§fn SelectPalette(
&self,
hpal: &HPALETTE,
force_bkgd: bool
) -> SysResult<Option<HPALETTE>>
fn SelectPalette( &self, hpal: &HPALETTE, force_bkgd: bool ) -> SysResult<Option<HPALETTE>>
SelectPalette
function.source§fn SetArcDirection(&self, dir: AD) -> SysResult<AD>
fn SetArcDirection(&self, dir: AD) -> SysResult<AD>
SetArcDirection
function.source§fn SetBkColor(&self, color: COLORREF) -> SysResult<COLORREF>
fn SetBkColor(&self, color: COLORREF) -> SysResult<COLORREF>
SetBkColor
function.source§fn SetBrushOrgEx(&self, new_origin: POINT) -> SysResult<POINT>
fn SetBrushOrgEx(&self, new_origin: POINT) -> SysResult<POINT>
SetBrushOrgEx
function.source§fn SetDCBrushColor(&self, color: COLORREF) -> SysResult<COLORREF>
fn SetDCBrushColor(&self, color: COLORREF) -> SysResult<COLORREF>
SetDCBrushColor
function.source§fn SetDCPenColor(&self, color: COLORREF) -> SysResult<COLORREF>
fn SetDCPenColor(&self, color: COLORREF) -> SysResult<COLORREF>
SetDCPenColor
function.source§fn SetDIBits(
&self,
hbm: &HBITMAP,
first_scan_line: u32,
num_scan_lines: u32,
dib_color_data: &[u8],
bmi: &BITMAPINFO,
color_use: DIB
) -> SysResult<i32>
fn SetDIBits( &self, hbm: &HBITMAP, first_scan_line: u32, num_scan_lines: u32, dib_color_data: &[u8], bmi: &BITMAPINFO, color_use: DIB ) -> SysResult<i32>
SetDIBits
function.source§fn SetGraphicsMode(&self, mode: GM) -> SysResult<GM>
fn SetGraphicsMode(&self, mode: GM) -> SysResult<GM>
SetGraphicsMode
function.source§fn SetStretchBltMode(&self, mode: STRETCH_MODE) -> SysResult<STRETCH_MODE>
fn SetStretchBltMode(&self, mode: STRETCH_MODE) -> SysResult<STRETCH_MODE>
SetStretchBltMode
function.source§fn SetTextAlign(&self, align: TA) -> SysResult<TA>
fn SetTextAlign(&self, align: TA) -> SysResult<TA>
SetTextAlign
function.source§fn SetTextColor(&self, color: COLORREF) -> SysResult<COLORREF>
fn SetTextColor(&self, color: COLORREF) -> SysResult<COLORREF>
SetTextColor
function.source§fn SetTextJustification(&self, extra: i32, count: i32) -> SysResult<()>
fn SetTextJustification(&self, extra: i32, count: i32) -> SysResult<()>
SetTextJustification
function.source§fn SetViewportExtEx(&self, x: i32, y: i32) -> SysResult<SIZE>
fn SetViewportExtEx(&self, x: i32, y: i32) -> SysResult<SIZE>
SetViewportExtEx
function.source§fn SetViewportOrgEx(&self, x: i32, y: i32) -> SysResult<POINT>
fn SetViewportOrgEx(&self, x: i32, y: i32) -> SysResult<POINT>
SetViewportOrgEx
function.source§fn SetWindowExtEx(&self, x: i32, y: i32) -> SysResult<SIZE>
fn SetWindowExtEx(&self, x: i32, y: i32) -> SysResult<SIZE>
SetWindowExtEx
function.source§fn SetWindowOrgEx(&self, x: i32, y: i32) -> SysResult<POINT>
fn SetWindowOrgEx(&self, x: i32, y: i32) -> SysResult<POINT>
SetWindowOrgEx
function.source§fn StretchBlt(
&self,
pos_dest: POINT,
sz_dest: SIZE,
hdc_src: &HDC,
pt_src: POINT,
sz_src: SIZE,
rop: ROP
) -> SysResult<()>
fn StretchBlt( &self, pos_dest: POINT, sz_dest: SIZE, hdc_src: &HDC, pt_src: POINT, sz_src: SIZE, rop: ROP ) -> SysResult<()>
StretchBlt
function.source§fn StrokeAndFillPath(&self) -> SysResult<()>
fn StrokeAndFillPath(&self) -> SysResult<()>
StrokeAndFillPath
function.source§fn StrokePath(&self) -> SysResult<()>
fn StrokePath(&self) -> SysResult<()>
StrokePath
function.source§fn TransparentBlt(
&self,
dest_top_left: POINT,
dest_sz: SIZE,
hdc_src: HDC,
src_top_left: POINT,
src_sz: SIZE,
color_transparent: COLORREF
) -> SysResult<()>
fn TransparentBlt( &self, dest_top_left: POINT, dest_sz: SIZE, hdc_src: HDC, src_top_left: POINT, src_sz: SIZE, color_transparent: COLORREF ) -> SysResult<()>
TransparentBlt
function.source§fn UpdateColors(&self) -> SysResult<()>
fn UpdateColors(&self) -> SysResult<()>
UpdateColors
function.source§impl user_Hdc for HDC
impl user_Hdc for HDC
source§fn DrawFocusRect(&self, rect: &RECT) -> SysResult<()>
fn DrawFocusRect(&self, rect: &RECT) -> SysResult<()>
DrawFocusRect
function.source§fn DrawText(&self, text: &str, bounds: &RECT, format: DT) -> SysResult<i32>
fn DrawText(&self, text: &str, bounds: &RECT, format: DT) -> SysResult<i32>
DrawText
function.source§fn DrawTextEx(
&self,
text: &str,
bounds: &RECT,
format: DT,
dtp: Option<&DRAWTEXTPARAMS>
) -> SysResult<i32>
fn DrawTextEx( &self, text: &str, bounds: &RECT, format: DT, dtp: Option<&DRAWTEXTPARAMS> ) -> SysResult<i32>
DrawTextExW
function.source§fn EnumDisplayMonitors<F>(
&self,
rc_clip: Option<RECT>,
func: F
) -> SysResult<()>
fn EnumDisplayMonitors<F>( &self, rc_clip: Option<RECT>, func: F ) -> SysResult<()>
EnumDisplayMonitors
function. Read moresource§fn InvertRect(&self, rc: &RECT) -> SysResult<()>
fn InvertRect(&self, rc: &RECT) -> SysResult<()>
InvertRect
function.source§fn PaintDesktop(&self) -> SysResult<()>
fn PaintDesktop(&self) -> SysResult<()>
PaintDesktop
function.source§fn WindowFromDC(&self) -> Option<HWND>
fn WindowFromDC(&self) -> Option<HWND>
WindowFromDC
function.impl Eq for HDC
impl Send for HDC
impl StructuralPartialEq for HDC
Auto Trait Implementations§
impl Freeze for HDC
impl RefUnwindSafe for HDC
impl !Sync for HDC
impl Unpin for HDC
impl UnwindSafe for HDC
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more