Struct redwm::imports::PolySegmentRequest [−][src]
pub struct PolySegmentRequest<'input> { pub drawable: u32, pub gc: u32, pub segments: Cow<'input, [Segment]>, }
Expand description
draw lines.
Draws multiple, unconnected lines. For each segment, a line is drawn between
(x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of
xcb_segment_t
structures and does not perform joining at coincident
endpoints. For any given line, a pixel is not drawn more than once. If lines
intersect, the intersecting pixels are drawn multiple times.
TODO: include the xcb_segment_t data structure
TODO: an example
Fields
drawable
- A drawable (Window or Pixmap) to draw on.gc
- The graphics context to use.
TODO: document which attributes of a gc are used
segments_len
- The number ofxcb_segment_t
structures insegments
.segments
- An array ofxcb_segment_t
structures.
Errors
Drawable
- The specifieddrawable
does not exist.GContext
- The specifiedgc
does not exist.Match
- TODO: reasons?
Fields
drawable: u32
gc: u32
segments: Cow<'input, [Segment]>
Implementations
pub fn send<Conn>(
self,
conn: &Conn
) -> Result<VoidCookie<'_, Conn>, ConnectionError> where
Conn: RequestConnection + ?Sized,
pub fn try_parse_request(
header: RequestHeader,
value: &'input [u8]
) -> Result<PolySegmentRequest<'input>, ParseError>
pub fn try_parse_request(
header: RequestHeader,
value: &'input [u8]
) -> Result<PolySegmentRequest<'input>, ParseError>
Parse this request given its header, its body, and any fds that go along with it
Clone all borrowed data in this PolySegmentRequest.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<'input> RefUnwindSafe for PolySegmentRequest<'input>
impl<'input> Send for PolySegmentRequest<'input>
impl<'input> Sync for PolySegmentRequest<'input>
impl<'input> Unpin for PolySegmentRequest<'input>
impl<'input> UnwindSafe for PolySegmentRequest<'input>
Blanket Implementations
Mutably borrows from an owned value. Read more