pub trait gdi_Hdc: user_Hdc {
Show 91 methods
// Provided methods
fn AbortDoc(&self) -> SysResult<()> { ... }
fn AbortPath(&self) -> SysResult<()> { ... }
fn AlphaBlend(
&self,
origin_dest: RECT,
hdc_src: &HDC,
origin_src: RECT,
ftn: &BLENDFUNCTION,
) -> SysResult<()> { ... }
fn AngleArc(
&self,
center: POINT,
radius: u32,
start_angle: f32,
sweep_angle: f32,
) -> SysResult<()> { ... }
fn Arc(
&self,
bound: RECT,
radial_start: POINT,
radial_end: POINT,
) -> SysResult<()> { ... }
fn ArcTo(
&self,
bound: RECT,
radial_start: POINT,
radial_end: POINT,
) -> SysResult<()> { ... }
fn BeginPath(&self) -> SysResult<()> { ... }
fn BitBlt(
&self,
dest_pos: POINT,
sz: SIZE,
hdc_src: &HDC,
src_src: POINT,
rop: ROP,
) -> SysResult<()> { ... }
fn CancelDC(&self) -> SysResult<()> { ... }
fn Chord(
&self,
bounds: RECT,
start_radial: POINT,
end_radial: POINT,
) -> SysResult<()> { ... }
fn CloseFigure(&self) -> SysResult<()> { ... }
fn CreateCompatibleBitmap(
&self,
cx: i32,
cy: i32,
) -> SysResult<DeleteObjectGuard<HBITMAP>> { ... }
fn CreateCompatibleDC(&self) -> SysResult<DeleteDCGuard> { ... }
fn CreateHalftonePalette(&self) -> SysResult<DeleteObjectPaletteGuard> { ... }
fn Ellipse(&self, bound: RECT) -> SysResult<()> { ... }
fn EndPath(&self) -> SysResult<()> { ... }
fn ExcludeClipRect(&self, rc: RECT) -> SysResult<REGION> { ... }
fn FillPath(&self) -> SysResult<()> { ... }
fn FillRect(&self, rc: RECT, hbr: &HBRUSH) -> SysResult<()> { ... }
fn FillRgn(&self, rgn: &HRGN, brush: &HBRUSH) -> SysResult<()> { ... }
fn FlattenPath(&self) -> SysResult<()> { ... }
fn FrameRgn(
&self,
rgn: &HRGN,
brush: &HBRUSH,
w: i32,
h: i32,
) -> SysResult<()> { ... }
fn GetBkColor(&self) -> SysResult<COLORREF> { ... }
fn GetBkMode(&self) -> SysResult<BKMODE> { ... }
fn GetCurrentObject(&self, kind: CUR_OBJ) -> SysResult<CurObj> { ... }
fn GetCurrentPositionEx(&self) -> SysResult<POINT> { ... }
fn GetDCBrushColor(&self) -> SysResult<COLORREF> { ... }
fn GetDCPenColor(&self) -> SysResult<COLORREF> { ... }
fn GetDeviceCaps(&self, index: GDC) -> 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> { ... }
fn GetStretchBltMode(&self) -> SysResult<STRETCH_MODE> { ... }
fn GetTextColor(&self) -> SysResult<COLORREF> { ... }
fn GetTextExtentPoint32(&self, text: &str) -> SysResult<SIZE> { ... }
fn GetTextFace(&self) -> SysResult<String> { ... }
fn GetTextMetrics(&self) -> SysResult<TEXTMETRIC> { ... }
fn GetViewportExtEx(&self) -> SysResult<SIZE> { ... }
fn GetViewportOrgEx(&self) -> SysResult<POINT> { ... }
fn GetWindowExtEx(&self) -> SysResult<SIZE> { ... }
fn GetWindowOrgEx(&self) -> SysResult<POINT> { ... }
fn HiMetricToPixel(&self, x: i32, y: i32) -> (i32, i32) { ... }
fn IntersectClipRect(&self, rc: RECT) -> SysResult<()> { ... }
fn InvertRgn(&self, hrgn: &HRGN) -> SysResult<()> { ... }
fn LineTo(&self, x: i32, y: i32) -> SysResult<()> { ... }
fn MaskBlt(
&self,
dest_top_left: POINT,
sz: SIZE,
hdc_src: &HDC,
src_top_left: POINT,
hbm_mask: &HBITMAP,
mask_offset: POINT,
rop: ROP,
) -> SysResult<()> { ... }
fn MoveToEx(&self, x: i32, y: i32, pt: Option<&mut POINT>) -> SysResult<()> { ... }
fn PaintRgn(&self, hrgn: &HRGN) -> SysResult<()> { ... }
fn PatBlt(&self, top_left: POINT, sz: SIZE, rop: ROP) -> SysResult<()> { ... }
fn PathToRegion(&self) -> SysResult<DeleteObjectGuard<HRGN>> { ... }
fn Pie(
&self,
bounds: RECT,
radial_1: POINT,
radial_2: POINT,
) -> SysResult<()> { ... }
fn PixelToHiMetric(&self, x: i32, y: i32) -> (i32, i32) { ... }
fn PolyBezier(&self, pts: &[POINT]) -> SysResult<()> { ... }
fn PolyBezierTo(&self, pts: &[POINT]) -> SysResult<()> { ... }
fn PolyDraw(&self, pts: &[(POINT, PT)]) -> SysResult<()> { ... }
fn Polygon(&self, pts: &[POINT]) -> SysResult<()> { ... }
fn Polyline(&self, pts: &[POINT]) -> SysResult<()> { ... }
fn PolylineTo(&self, pts: &[POINT]) -> SysResult<()> { ... }
fn PolyPolygon(&self, polygons: &[&[POINT]]) -> SysResult<()> { ... }
fn PolyPolyline(&self, polylines: &[&[POINT]]) -> SysResult<()> { ... }
fn PtVisible(&self, x: i32, y: i32) -> SysResult<bool> { ... }
fn RealizePalette(&self) -> SysResult<u32> { ... }
fn Rectangle(&self, bounds: RECT) -> SysResult<()> { ... }
fn RestoreDC(&self, saved_dc: i32) -> SysResult<()> { ... }
fn RoundRect(&self, bounds: RECT, sz: SIZE) -> SysResult<()> { ... }
fn SaveDC(&self) -> SysResult<i32> { ... }
fn SelectClipPath(&self, mode: RGN) -> SysResult<()> { ... }
fn SelectClipRgn(&self, rgn: &HRGN) -> SysResult<REGION> { ... }
fn SelectObject<G>(
&self,
hgdiobj: &G,
) -> SysResult<SelectObjectGuard<'_, Self, G>>
where G: GdiObject { ... }
fn SelectPalette(
&self,
hpal: &HPALETTE,
force_bkgd: bool,
) -> SysResult<HPALETTE> { ... }
fn SetArcDirection(&self, dir: AD) -> SysResult<AD> { ... }
fn SetBkColor(&self, color: COLORREF) -> SysResult<COLORREF> { ... }
fn SetBkMode(&self, mode: BKMODE) -> SysResult<BKMODE> { ... }
fn SetBrushOrgEx(&self, new_origin: POINT) -> SysResult<POINT> { ... }
fn SetDCBrushColor(&self, color: COLORREF) -> SysResult<COLORREF> { ... }
fn SetDCPenColor(&self, color: COLORREF) -> SysResult<COLORREF> { ... }
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 SetGraphicsMode(&self, mode: GM) -> SysResult<GM> { ... }
fn SetStretchBltMode(&self, mode: STRETCH_MODE) -> SysResult<STRETCH_MODE> { ... }
fn SetTextAlign(&self, align: TA) -> SysResult<TA> { ... }
fn SetTextColor(&self, color: COLORREF) -> SysResult<COLORREF> { ... }
fn SetTextJustification(&self, extra: i32, count: i32) -> SysResult<()> { ... }
fn SetViewportExtEx(&self, x: i32, y: i32) -> SysResult<SIZE> { ... }
fn SetViewportOrgEx(&self, x: i32, y: i32) -> SysResult<POINT> { ... }
fn SetWindowExtEx(&self, x: i32, y: i32) -> SysResult<SIZE> { ... }
fn SetWindowOrgEx(&self, x: i32, y: i32) -> SysResult<POINT> { ... }
fn StretchBlt(
&self,
pos_dest: POINT,
sz_dest: SIZE,
hdc_src: &HDC,
pt_src: POINT,
sz_src: SIZE,
rop: ROP,
) -> SysResult<()> { ... }
fn StrokeAndFillPath(&self) -> SysResult<()> { ... }
fn StrokePath(&self) -> SysResult<()> { ... }
fn TextOut(&self, x: i32, y: i32, text: &str) -> 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<()> { ... }
fn UpdateColors(&self) -> SysResult<()> { ... }
fn WidenPath(&self) -> SysResult<()> { ... }
}
kernel
and gdi
only.Expand description
This trait is enabled with the gdi
feature, and provides methods for
HDC
.
Prefer importing this trait through the prelude:
use winsafe::prelude::*;
Provided Methods§
Sourcefn AbortPath(&self) -> SysResult<()>
fn AbortPath(&self) -> SysResult<()>
AborthPath
function.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn CloseFigure(&self) -> SysResult<()>
fn CloseFigure(&self) -> SysResult<()>
CloseFigure
function.
Sourcefn CreateCompatibleBitmap(
&self,
cx: i32,
cy: i32,
) -> SysResult<DeleteObjectGuard<HBITMAP>>
fn CreateCompatibleBitmap( &self, cx: i32, cy: i32, ) -> SysResult<DeleteObjectGuard<HBITMAP>>
CreateCompatibleBitmap
function.
Sourcefn CreateCompatibleDC(&self) -> SysResult<DeleteDCGuard>
fn CreateCompatibleDC(&self) -> SysResult<DeleteDCGuard>
CreateCompatibleDC
function.
Sourcefn CreateHalftonePalette(&self) -> SysResult<DeleteObjectPaletteGuard>
fn CreateHalftonePalette(&self) -> SysResult<DeleteObjectPaletteGuard>
CreateHalftonePalette
function.
Sourcefn ExcludeClipRect(&self, rc: RECT) -> SysResult<REGION>
fn ExcludeClipRect(&self, rc: RECT) -> SysResult<REGION>
ExcludeClipRect
function.
Sourcefn FlattenPath(&self) -> SysResult<()>
fn FlattenPath(&self) -> SysResult<()>
FlattenPath
function.
Sourcefn 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.
Sourcefn GetBkColor(&self) -> SysResult<COLORREF>
fn GetBkColor(&self) -> SysResult<COLORREF>
GetBkColor
function.
Sourcefn GetCurrentObject(&self, kind: CUR_OBJ) -> SysResult<CurObj>
fn GetCurrentObject(&self, kind: CUR_OBJ) -> SysResult<CurObj>
GetCurrentObject
function.
§Examples
use winsafe::{self as w, prelude::*, co};
let hdc: w::HDC; // initialized somewhere
let obj = hdc.GetCurrentObject(co::CUR_OBJ::BRUSH)?;
let w::CurObj::Brush(hbrush) = obj else { unreachable!() };
println!("HBRUSH: {}", hbrush);
w::SysResult::Ok(())
Sourcefn GetCurrentPositionEx(&self) -> SysResult<POINT>
fn GetCurrentPositionEx(&self) -> SysResult<POINT>
GetCurrentPositionEx
function.
Sourcefn GetDCBrushColor(&self) -> SysResult<COLORREF>
fn GetDCBrushColor(&self) -> SysResult<COLORREF>
GetDCBrushColor
function.
Sourcefn GetDCPenColor(&self) -> SysResult<COLORREF>
fn GetDCPenColor(&self) -> SysResult<COLORREF>
GetDCPenColor
function.
Sourcefn GetDeviceCaps(&self, index: GDC) -> i32
fn GetDeviceCaps(&self, index: GDC) -> i32
GetDeviceCaps
function.
Sourceunsafe 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>
GetDIBits
function.
§Safety
If bmpDataBuf
is smaller than needed, you’ll have a buffer overflow.
§Examples
Taking a screenshot and saving to file:
use winsafe::{self as w, prelude::*, co};
let cx_screen = w::GetSystemMetrics(co::SM::CXSCREEN);
let cy_screen = w::GetSystemMetrics(co::SM::CYSCREEN);
let hdc_screen = w::HWND::DESKTOP.GetDC()?;
let hbmp = hdc_screen.CreateCompatibleBitmap(cx_screen, cy_screen)?;
let hdc_mem = hdc_screen.CreateCompatibleDC()?;
let _hbmp_guard = hdc_mem.SelectObject(&*hbmp)?;
hdc_mem.BitBlt(w::POINT::new(0, 0), w::SIZE::new(cx_screen, cy_screen),
&hdc_screen, w::POINT::new(0, 0), co::ROP::SRCCOPY)?;
let mut bmp_obj = w::BITMAP::default();
hbmp.GetObject(&mut bmp_obj)?;
let mut bi = w::BITMAPINFO::default();
bi.bmiHeader.biWidth = cx_screen;
bi.bmiHeader.biHeight = cy_screen;
bi.bmiHeader.biPlanes = 1;
bi.bmiHeader.biBitCount = 32;
bi.bmiHeader.biCompression = co::BI::RGB;
let bmp_size = (bmp_obj.bmWidth * (bi.bmiHeader.biBitCount as i32) + 31)
/ 32 * 4 * bmp_obj.bmHeight;
let mut data_buf = vec![0u8; bmp_size as _];
unsafe {
hdc_screen.GetDIBits(&hbmp, 0, cy_screen as _,
Some(&mut data_buf), &mut bi, co::DIB::RGB_COLORS)?;
}
let mut bfh = w::BITMAPFILEHEADER::default();
bfh.bfOffBits = (std::mem::size_of::<w::BITMAPFILEHEADER>()
+ std::mem::size_of::<w::BITMAPINFOHEADER>()) as _;
bfh.bfSize = bfh.bfOffBits + (bmp_size as u32);
let fo = w::File::open("C:\\Temp\\foo.bmp", w::FileAccess::OpenOrCreateRW)?;
fo.write(bfh.serialize())?;
fo.write(bi.bmiHeader.serialize())?;
fo.write(&data_buf)?;
Sourcefn GetStretchBltMode(&self) -> SysResult<STRETCH_MODE>
fn GetStretchBltMode(&self) -> SysResult<STRETCH_MODE>
GetStretchBltMode
function.
Sourcefn GetTextColor(&self) -> SysResult<COLORREF>
fn GetTextColor(&self) -> SysResult<COLORREF>
GetTextColor
function.
Sourcefn GetTextExtentPoint32(&self, text: &str) -> SysResult<SIZE>
fn GetTextExtentPoint32(&self, text: &str) -> SysResult<SIZE>
GetTextExtentPoint32
function.
Sourcefn GetTextFace(&self) -> SysResult<String>
fn GetTextFace(&self) -> SysResult<String>
GetTextFace
function.
Sourcefn GetTextMetrics(&self) -> SysResult<TEXTMETRIC>
fn GetTextMetrics(&self) -> SysResult<TEXTMETRIC>
GetTextMetrics
function.
Sourcefn GetViewportExtEx(&self) -> SysResult<SIZE>
fn GetViewportExtEx(&self) -> SysResult<SIZE>
GetViewportExtEx
function.
Sourcefn GetViewportOrgEx(&self) -> SysResult<POINT>
fn GetViewportOrgEx(&self) -> SysResult<POINT>
GetViewportOrgEx
function.
Sourcefn GetWindowExtEx(&self) -> SysResult<SIZE>
fn GetWindowExtEx(&self) -> SysResult<SIZE>
GetWindowExtEx
function.
Sourcefn GetWindowOrgEx(&self) -> SysResult<POINT>
fn GetWindowOrgEx(&self) -> SysResult<POINT>
GetWindowOrgEx
function.
Sourcefn HiMetricToPixel(&self, x: i32, y: i32) -> (i32, i32)
fn HiMetricToPixel(&self, x: i32, y: i32) -> (i32, i32)
AtlHiMetricToPixel
function.
Converts HIMETRIC units to pixels. The inverse operation is
HDC::PixelToHiMetric
.
Sourcefn IntersectClipRect(&self, rc: RECT) -> SysResult<()>
fn IntersectClipRect(&self, rc: RECT) -> SysResult<()>
IntersectClipRect
function.
Sourcefn MaskBlt(
&self,
dest_top_left: POINT,
sz: SIZE,
hdc_src: &HDC,
src_top_left: POINT,
hbm_mask: &HBITMAP,
mask_offset: POINT,
rop: ROP,
) -> SysResult<()>
fn MaskBlt( &self, dest_top_left: POINT, sz: SIZE, hdc_src: &HDC, src_top_left: POINT, hbm_mask: &HBITMAP, mask_offset: POINT, rop: ROP, ) -> SysResult<()>
MaskBlt
function.
Sourcefn PathToRegion(&self) -> SysResult<DeleteObjectGuard<HRGN>>
fn PathToRegion(&self) -> SysResult<DeleteObjectGuard<HRGN>>
PathToRegion
function.
Sourcefn PixelToHiMetric(&self, x: i32, y: i32) -> (i32, i32)
fn PixelToHiMetric(&self, x: i32, y: i32) -> (i32, i32)
AtlPixelToHiMetric
function.
Converts pixels to HIMETRIC units. The inverse operation is
HDC::HiMetricToPixel
.
Sourcefn PolyBezier(&self, pts: &[POINT]) -> SysResult<()>
fn PolyBezier(&self, pts: &[POINT]) -> SysResult<()>
PolyBezier
function.
Sourcefn PolyBezierTo(&self, pts: &[POINT]) -> SysResult<()>
fn PolyBezierTo(&self, pts: &[POINT]) -> SysResult<()>
PolyBezierTo
function.
Sourcefn PolylineTo(&self, pts: &[POINT]) -> SysResult<()>
fn PolylineTo(&self, pts: &[POINT]) -> SysResult<()>
PolylineTo
function.
Sourcefn PolyPolygon(&self, polygons: &[&[POINT]]) -> SysResult<()>
fn PolyPolygon(&self, polygons: &[&[POINT]]) -> SysResult<()>
PolyPolygon
function.
Sourcefn PolyPolyline(&self, polylines: &[&[POINT]]) -> SysResult<()>
fn PolyPolyline(&self, polylines: &[&[POINT]]) -> SysResult<()>
PolyPolyline
function.
Sourcefn RealizePalette(&self) -> SysResult<u32>
fn RealizePalette(&self) -> SysResult<u32>
RealizePalette
function.
Sourcefn SelectClipPath(&self, mode: RGN) -> SysResult<()>
fn SelectClipPath(&self, mode: RGN) -> SysResult<()>
SelectClipPath
function.
Sourcefn SelectClipRgn(&self, rgn: &HRGN) -> SysResult<REGION>
fn SelectClipRgn(&self, rgn: &HRGN) -> SysResult<REGION>
SelectClipRgn
function.
Sourcefn SelectObject<G>(
&self,
hgdiobj: &G,
) -> SysResult<SelectObjectGuard<'_, Self, G>>where
G: GdiObject,
fn SelectObject<G>(
&self,
hgdiobj: &G,
) -> SysResult<SelectObjectGuard<'_, Self, G>>where
G: GdiObject,
SelectObject
function.
In the original C implementation, SelectObject
returns a handle to the
object being replaced. You must perform a cleanup operation, calling
SelectObject
again, passing the handle to the replaced object.
Here, the cleanup is performed automatically, because SelectObject
returns a SelectObjectGuard
, which
stores the replaced handle and calls SelectObject
automatically when
the guard goes out of scope. You must, however, keep the guard alive,
otherwise the cleanup will be performed right away.
§Examples
use winsafe::{self as w, prelude::*, co};
let hdc: w::HDC; // initialized somewhere
let hpen = w::HPEN::CreatePen(
co::PS::SOLID,
1,
w::COLORREF::new(0xff, 0x00, 0x88),
)?;
let _pen_guard = hdc.SelectObject(&*hpen); // keep guard alive
Sourcefn SelectPalette(
&self,
hpal: &HPALETTE,
force_bkgd: bool,
) -> SysResult<HPALETTE>
fn SelectPalette( &self, hpal: &HPALETTE, force_bkgd: bool, ) -> SysResult<HPALETTE>
SelectPalette
function.
Sourcefn SetArcDirection(&self, dir: AD) -> SysResult<AD>
fn SetArcDirection(&self, dir: AD) -> SysResult<AD>
SetArcDirection
function.
Sourcefn SetBkColor(&self, color: COLORREF) -> SysResult<COLORREF>
fn SetBkColor(&self, color: COLORREF) -> SysResult<COLORREF>
SetBkColor
function.
Sourcefn SetBrushOrgEx(&self, new_origin: POINT) -> SysResult<POINT>
fn SetBrushOrgEx(&self, new_origin: POINT) -> SysResult<POINT>
SetBrushOrgEx
function.
Sourcefn SetDCBrushColor(&self, color: COLORREF) -> SysResult<COLORREF>
fn SetDCBrushColor(&self, color: COLORREF) -> SysResult<COLORREF>
SetDCBrushColor
function.
Sourcefn SetDCPenColor(&self, color: COLORREF) -> SysResult<COLORREF>
fn SetDCPenColor(&self, color: COLORREF) -> SysResult<COLORREF>
SetDCPenColor
function.
Sourcefn 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.
Sourcefn SetGraphicsMode(&self, mode: GM) -> SysResult<GM>
fn SetGraphicsMode(&self, mode: GM) -> SysResult<GM>
SetGraphicsMode
function.
Sourcefn SetStretchBltMode(&self, mode: STRETCH_MODE) -> SysResult<STRETCH_MODE>
fn SetStretchBltMode(&self, mode: STRETCH_MODE) -> SysResult<STRETCH_MODE>
SetStretchBltMode
function.
Sourcefn SetTextAlign(&self, align: TA) -> SysResult<TA>
fn SetTextAlign(&self, align: TA) -> SysResult<TA>
SetTextAlign
function.
Sourcefn SetTextColor(&self, color: COLORREF) -> SysResult<COLORREF>
fn SetTextColor(&self, color: COLORREF) -> SysResult<COLORREF>
SetTextColor
function.
Sourcefn SetTextJustification(&self, extra: i32, count: i32) -> SysResult<()>
fn SetTextJustification(&self, extra: i32, count: i32) -> SysResult<()>
SetTextJustification
function.
Sourcefn SetViewportExtEx(&self, x: i32, y: i32) -> SysResult<SIZE>
fn SetViewportExtEx(&self, x: i32, y: i32) -> SysResult<SIZE>
SetViewportExtEx
function.
Sourcefn SetViewportOrgEx(&self, x: i32, y: i32) -> SysResult<POINT>
fn SetViewportOrgEx(&self, x: i32, y: i32) -> SysResult<POINT>
SetViewportOrgEx
function.
Sourcefn SetWindowExtEx(&self, x: i32, y: i32) -> SysResult<SIZE>
fn SetWindowExtEx(&self, x: i32, y: i32) -> SysResult<SIZE>
SetWindowExtEx
function.
Sourcefn SetWindowOrgEx(&self, x: i32, y: i32) -> SysResult<POINT>
fn SetWindowOrgEx(&self, x: i32, y: i32) -> SysResult<POINT>
SetWindowOrgEx
function.
Sourcefn 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.
Sourcefn StrokeAndFillPath(&self) -> SysResult<()>
fn StrokeAndFillPath(&self) -> SysResult<()>
StrokeAndFillPath
function.
Sourcefn StrokePath(&self) -> SysResult<()>
fn StrokePath(&self) -> SysResult<()>
StrokePath
function.
Sourcefn 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.
Sourcefn UpdateColors(&self) -> SysResult<()>
fn UpdateColors(&self) -> SysResult<()>
UpdateColors
function.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.