pub trait SurfaceExt {
// Required method
fn draw_barcode(&mut self, barcode: &Barcode, top_left: Point);
// Provided methods
fn draw_aztec(&mut self, text: &str, top_left: Point, width: f32) -> Result { ... }
fn draw_data_matrix(
&mut self,
text: &str,
top_left: Point,
width: f32,
) -> Result { ... }
fn draw_pdf417(&mut self, text: &str, top_left: Point, width: f32) -> Result { ... }
fn draw_qr_code(
&mut self,
text: &str,
top_left: Point,
width: f32,
) -> Result { ... }
}Expand description
Barcode writing extensions for krilla::surface::Surface.
§Implementations
This interface is implemented for krilla::surface::Surface and that is the only
intended implementation.
The public, document functions on this interface are covered under semver. They are, however, not intended for implementations outside of this crate. While those implementations are technically permitted, they are not covered by semver. If you implement this trait yourself, pin the version of this library.
Required Methods§
fn draw_barcode(&mut self, barcode: &Barcode, top_left: Point)
Provided Methods§
Sourcefn draw_aztec(&mut self, text: &str, top_left: Point, width: f32) -> Result
fn draw_aztec(&mut self, text: &str, top_left: Point, width: f32) -> Result
Draw an Aztec barcode containing text at the top_left position.
Sourcefn draw_data_matrix(
&mut self,
text: &str,
top_left: Point,
width: f32,
) -> Result
fn draw_data_matrix( &mut self, text: &str, top_left: Point, width: f32, ) -> Result
Draw a data matrix containing text at the top_left position.