Expand native PDF image bounding-box queries
This commit is contained in:
1 parent
4fb0f2c89b
commit
2fa11fb971
8 files changed
+141
-31
No files matched your search
@@ -102,6 +102,7 @@ pub enum Primitive {
|
||||
Pdfximage,
|
||||
Pdfrefximage,
|
||||
Pdflastximage,
|
||||
Pdfximagebbox,
|
||||
Pdflastximagepages,
|
||||
Pdflastximagecolordepth,
|
||||
Jobname,
|
||||
@@ -531,6 +532,7 @@ impl Primitive {
|
||||
| XeTeXfeaturename
|
||||
| XeTeXselectorname
|
||||
| Pdfstrcmp
|
||||
| Pdfximagebbox
|
||||
| Pdfmatch
|
||||
| Pdflastmatch
|
||||
| Pdfuniformdeviate
|
||||
@@ -949,6 +951,7 @@ const PDFTEX_ONLY_PRIMITIVES: &[(&str, Primitive)] = {
|
||||
("pdfximage", Pdfximage),
|
||||
("pdfrefximage", Pdfrefximage),
|
||||
("pdflastximage", Pdflastximage),
|
||||
("pdfximagebbox", Pdfximagebbox),
|
||||
("pdflastximagepages", Pdflastximagepages),
|
||||
("pdflastximagecolordepth", Pdflastximagecolordepth),
|
||||
("pdfcreationdate", Pdfcreationdate),
|
||||
@@ -2007,6 +2010,11 @@ impl State {
|
||||
self.update_profile_command("pdfthreadmargin", Meaning::Parameter(Parameter::Pdfthreadmargin), enabled);
|
||||
}
|
||||
|
||||
pub(super) fn install_pdf_image_query_command(&mut self) {
|
||||
let enabled = self.input_profile != super::InputProfile::XeTeX;
|
||||
self.update_profile_command("pdfximagebbox", Meaning::Primitive(Primitive::Pdfximagebbox), enabled);
|
||||
}
|
||||
|
||||
fn install_pdftex_primitives(&mut self) {
|
||||
let enabled = self.input_profile != super::InputProfile::XeTeX;
|
||||
for &(name, primitive) in PDFTEX_ONLY_PRIMITIVES {
|
||||
|
||||
Reference in new issue
Block a user