Fix comments typo
This commit is contained in:
parent
eea3c757c0
commit
199c60b874
14
src/core.rs
14
src/core.rs
@ -50,9 +50,9 @@ impl XContext {
|
|||||||
|
|
||||||
/// Capture a rectangular part of the screen.
|
/// Capture a rectangular part of the screen.
|
||||||
///
|
///
|
||||||
/// `ctxt` – connection + screen info\
|
/// `ctxt` - connection + screen info\
|
||||||
/// `x_coord,y_coord` – top-left corner of the rectangle\
|
/// `x_coord,y_coord` - top-left corner of the rectangle\
|
||||||
/// `width,height` – size of the rectangle
|
/// `width,height` - size of the rectangle
|
||||||
///
|
///
|
||||||
/// Returns: a `Vec<u8>` containing RGBA pixel data.
|
/// Returns: a `Vec<u8>` containing RGBA pixel data.
|
||||||
pub fn capture_rect(
|
pub fn capture_rect(
|
||||||
@ -104,10 +104,10 @@ pub fn capture_rect(
|
|||||||
|
|
||||||
/// Save an RGBA pixel buffer as a PNG file.
|
/// Save an RGBA pixel buffer as a PNG file.
|
||||||
///
|
///
|
||||||
/// `path` – where to write the file\
|
/// `path` - where to write the file\
|
||||||
/// `width` – image width in pixels\
|
/// `width` - image width in pixels\
|
||||||
/// `height` – image height in pixels\
|
/// `height` - image height in pixels\
|
||||||
/// `rgba` – pixel data in RGBA format
|
/// `rgba` - pixel data in RGBA format
|
||||||
pub fn save_png(path: &str, width: u16, height: u16, rgba: &[u8]) -> anyhow::Result<()> {
|
pub fn save_png(path: &str, width: u16, height: u16, rgba: &[u8]) -> anyhow::Result<()> {
|
||||||
let file = File::create(path)?;
|
let file = File::create(path)?;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user