Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default size of icons #1

Open
pavelda2 opened this issue Jul 13, 2018 · 4 comments
Open

Default size of icons #1

pavelda2 opened this issue Jul 13, 2018 · 4 comments

Comments

@pavelda2
Copy link

Issue description

When I drag&drop an icon from Pencil panel to the page, the icon is located at wrong position and has size of zero.

pencil_stencil_generator

@wolfgaase
Copy link

wolfgaase commented Nov 13, 2018

Possibly the "%.5f" in the file "\src\main\java\in\oneton\pencil\stencil\generator\StencilDefinitionGenerator.java", in the line private static final String XML_SHAPE is using the system default decimal separator; In my case "," instead ".".
The generated Definition.xml file looks like this
<Property name = "box" type = "Dimension" displayName = "Size"> 26,25000,30,00000</ Property>

I changed the file StencilDefinitionGenerator.java from:

private static final String XML_DEFINITION_SUFFIX = "</Shapes>";
    public static void main(String[] args) throws IOException {

to:

private static final String XML_DEFINITION_SUFFIX = "</Shapes>";
    public static void main(String[] args) throws IOException {
        Locale.setDefault(new Locale("en", "US"));

After changing the file, run gradle and java jar again. The Definition.xml file will look like:
<Property name="box" type="Dimension" displayName="Size">26.25000,30.00000</Property>

Now just import the stencil into the Pencil.
pencil

@thekalinga
Copy link
Member

@wolfgaase Will publish the change soon. Thanks for pointing this out

@rafaelreuber
Copy link

1+

@rafaelreuber
Copy link

pencil-stencil-generator is awesome. When this bug will be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants