Skip to content

Commit

Permalink
revert table changes; add author
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienSchminke committed Jun 16, 2023
1 parent 9247223 commit a51979a
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 81 deletions.
7 changes: 0 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "printpdf"
version = "0.5.3"
authors = ["Felix Schütt <[email protected]>"]
authors = ["Felix Schütt <[email protected]>", "Julien Schminke <[email protected]"]
repository = "https://github.com/fschutt/printpdf"
homepage = "https://github.com/fschutt/printpdf"
license = "MIT"
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ extern crate js_sys;

pub use lopdf;

//pub mod table;
pub mod color;
pub mod ctm;
pub mod date;
Expand Down
37 changes: 0 additions & 37 deletions src/pdf_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,43 +55,6 @@ impl From<PdfLayer> for lopdf::Stream {
}

impl PdfLayerReference {
/* /// Add a table to the layer.
/// - [x] TODO add table based on given columns and rows
/// - [ ] TODO possibility to set column_lines manually
pub fn add_table(&self, column_count: u8, row_count: u8, bottom_left_corner: Point, width: Mm, height: Mm) {
let column_offset = width / column_count as f64;
let row_offset = height / row_count as f64;
let mut line_operations = Vec::new();
for col in 0..=column_count {
line_operations.append(&mut Line {
points: vec![(Point::new(Mm::from(bottom_left_corner.x) + column_offset * col as f64, Mm::from(bottom_left_corner.y) ), false),
(Point::new(Mm::from(bottom_left_corner.x) + column_offset * col as f64, Mm::from(bottom_left_corner.y) + height), false)],
is_closed: false,
has_fill: false,
has_stroke: true,
is_clipping_path: false,
}.into_stream_op());
}
for row in 0..=row_count {
line_operations.append(&mut Line {
points: vec![(Point::new(Mm::from(bottom_left_corner.x) , Mm::from(bottom_left_corner.y) + row_offset * row as f64), false),
(Point::new(Mm::from(bottom_left_corner.x) + width, Mm::from(bottom_left_corner.y) + row_offset * row as f64), false)],
is_closed: false,
has_fill: false,
has_stroke: true,
is_clipping_path: false,
}.into_stream_op());
}
for operation in line_operations {
self.add_operation(operation);
}
}
*/

/// Add a shape to the layer. Use `closed` to indicate whether the line is a closed line
/// Use has_fill to determine if the line should be filled.
pub fn add_shape(&self, line: Line) {
Expand Down
21 changes: 0 additions & 21 deletions src/table.rs

This file was deleted.

14 changes: 0 additions & 14 deletions tests/add_table_tests.rs

This file was deleted.

0 comments on commit a51979a

Please sign in to comment.