pdf-rs / pdf_render

MIT License
104 stars 21 forks source link

[HELP ME] When using `pdf_render` outside, build error occurred. #3

Closed chatblanc-ciel closed 2 years ago

chatblanc-ciel commented 2 years ago

This line, cargo said that points is private. https://github.com/pdf-rs/pdf_render/blob/a57d54fe01f783af305334edca712abd556b885e/render/src/graphicsstate.rs#L83

Build error is occurred.

error[E0599]: no method named `points` found for reference `&Contour` in the current scope
  --> /root/.cargo/git/checkouts/pdf_render-56211f49c16f7190/a57d54f/render/src/graphicsstate.rs:83:50
   |
83 |                 let clip_polygon = outer_contour.points();
   |                                                  ^^^^^^ private field, not a method

For more information about this error, try `rustc --explain E0599`.
error: could not compile `pdf_render` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed

I think this error is meaning using pub(carte) item. let see below. https://github.com/s3bk/pathfinder/blob/bb4792c3b04be6bc05848534dc924946d60fd142/content/src/outline.rs#L44

Please, help me.

s3bk commented 2 years ago

Ah sorry. Right now my PR still has not been merged, so you will need to use a [patch] section in your final crate:


[patch."https://github.com/servo/pathfinder"]
pathfinder_gpu = { git = "https://github.com/s3bk/pathfinder" }
pathfinder_content = { git = "https://github.com/s3bk/pathfinder" }
pathfinder_color = { git = "https://github.com/s3bk/pathfinder" }
pathfinder_geometry = { git = "https://github.com/s3bk/pathfinder" }
pathfinder_renderer = { git = "https://github.com/s3bk/pathfinder" }
pathfinder_resources = { git = "https://github.com/s3bk/pathfinder" }
pathfinder_simd = { git = "https://github.com/s3bk/pathfinder" }
chatblanc-ciel commented 2 years ago

Thank you for your reply!

I'll try it, please wait keeping issue open for little days.