public void setEditor(@NonNull Editor editor) { this.editor = editor; editor.addListener(this); editor.getRenderer().addListener(this); this.exportParams = editor.getEngine().createParameterSet(); this.exportParams.setBoolean("export.jiix.strokes", false); this.exportParams.setBoolean("export.jiix.bounding-box", false); this.exportParams.setBoolean("export.jiix.glyphs", false); this.exportParams.setBoolean("export.jiix.primitives", false); this.exportParams.setBoolean("export.jiix.chars", false); Configuration configuration = editor.getEngine().getConfiguration(); fadeOutWriteInDiagramDelay = configuration.getNumber("smart-guide.fade-out-delay.write-in-diagram", SMART_GUIDE_FADE_OUT_DELAY_WRITE_IN_DIAGRAM_DEFAULT).intValue(); fadeOutWriteDelay = configuration.getNumber("smart-guide.fade-out-delay.write", SMART_GUIDE_FADE_OUT_DELAY_WRITE_DEFAULT).intValue(); fadeOutOtherDelay = configuration.getNumber("smart-guide.fade-out-delay.other", SMART_GUIDE_FADE_OUT_DELAY_OTHER_DEFAULT).intValue(); removeHighlightDelay = configuration.getNumber("smart-guide.highlight-removal-delay", SMART_GUIDE_HIGHLIGHT_REMOVAL_DELAY_DEFAULT).intValue(); }
float verticalMarginMM = 25.4f * verticalMarginPX / displayMetrics.ydpi; float horizontalMarginMM = 25.4f * horizontalMarginPX / displayMetrics.xdpi; conf.setNumber("text.margin.top", verticalMarginMM); conf.setNumber("text.margin.left", horizontalMarginMM); conf.setNumber("text.margin.right", horizontalMarginMM); conf.setNumber("math.margin.top", verticalMarginMM); conf.setNumber("math.margin.bottom", verticalMarginMM); conf.setNumber("math.margin.left", horizontalMarginMM); conf.setNumber("math.margin.right", horizontalMarginMM);
conf.setStringArray("configuration-manager.search-path", new String[]{confDir}); String tempDir = getFilesDir().getPath() + File.separator + "tmp"; conf.setString("content-package.temp-folder", tempDir);
conf.setStringArray("configuration-manager.search-path", new String[]{confDir}); String tempDir = getFilesDir().getPath() + File.separator + "tmp"; conf.setString("content-package.temp-folder", tempDir);