Code Monkey home page Code Monkey logo

vectalign's People

Contributors

bonnyfone avatar csfmeridian avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vectalign's Issues

java.lang.ArrayIndexOutOfBoundsException

java -jar vectalign-0.2-jar-with-dependencies.jar --start "M 16 17 A 1,1,0,1,0,15,16 A 1,1,0,0,0,16,17 Z M 16 18 A 2,2,0,1,1,18,16 A 1.9994,1.9994,0,0,1,16,18 Z M 16.95 15.948 L 16.4 15.948 L 16.4 15.125 L 15.577 15.125 L 15.577 15.948 L 15.028 15.948 L 15.988 16.91 Z" --end "M16,26C21.52,26 26,21.52 26,16C26,10.48 21.52,6 16,6C10.48,6 6,10.48 6,16C6,21.52 10.48,26 16,26ZM16,28C9.37,28 4,22.63 4,16C4,9.37 9.37,4 16,4C22.63,4 28,9.37 28,16C28,22.63 22.63,28 16,28ZM21.7,15.69L18.4,15.69L18.4,10.75L13.46,10.75L13.46,15.69L10.17,15.69L15.93,21.46L21.7,15.69Z" --mode BASE

Sequences sizes: 16 / 21
Aligning mode: BASE
0. align iteration...
Alignment found!
M A A # # # # L M A A # # # # L M # L L L L L L L
M # # C C C C L M # # C C C C L M L L L L L L L L
Sequence aligned! (25 elements)
###################### EXCEPTION #####################
java.lang.ArrayIndexOutOfBoundsException: 7
at com.bonnyfone.vectalign.techniques.BaseFillMode.fillInjectedNodes(BaseFillMode.java:93)
at com.bonnyfone.vectalign.VectAlign.align(VectAlign.java:120)
at com.bonnyfone.vectalign.Main.main(Main.java:104)
######################################################

java.lang.ArrayIndexOutOfBoundsException in checkPenPosValidity

I am developing dynamic symbolic execution tool for Java programs. Now I am using it as fully automatic tool for defect detection on some open source programs from GitHub. It has found some java.lang.ArrayIndexOutOfBoundsExceptions in VectAlign:

java.lang.ArrayIndexOutOfBoundsException: -1
	at com.bonnyfone.vectalign.techniques.BaseFillMode.checkPenPosValidity(BaseFillMode.java:110)
	at com.bonnyfone.vectalign.techniques.BaseFillMode.fillInjectedNodes(BaseFillMode.java:101)
	at com.bonnyfone.vectalign.VectAlign.align(VectAlign.java:120)
	at com.bonnyfone.vectalign.Main.main(Main.java:104)
	at jia.test.big.VectalignTest.main(VectalignTest.java:23)

Constructed input was manually minimized to -s L -e M.

Arguments to and from (returned from method doRawAlign) of fillInjectedNodes method are empty ArrayLists. So I think either doRawAlign should not return empty lists or checkPenPosValidity should have additional check on its arguments.

Input is incorrect, so, please let me know is this a bug or undefined behavior caused by incorrect input. In other words, do you think analyzer has reported a real bug or a false positive.

New on github

Hey bonny, im new on github and i wanna use this repository but dont know how, is there a tutorial or something I can watch to know exactly how to open and use the jar in command line? thanks

Suggestion: Add morphed "rotation" setting

So, when playing with vectalign I noticed that it fails a lot of the time when trying to morph between assets where the "centerline", that is, the visual rotation axis where two assets should meet at an intermediary representation, isn't aligned.
Take a play and a pause icon for example:
The play icon is "visually", with respect to its symmetry, rotated 90 degrees clockwise relative to the pause icon. Rotating the play icon -90 degrees before morphing generates a much smoother transition.
Solution would be to add a rotation to one/other of the assets in the transition.

Creates a small graphics issue

Hi @bonnyfone

Thank you for this library.

The Icons

The start icon (SVG): https://storage.googleapis.com/material-icons/external-assets/v1/icons/svg/ic_menu_white_24px.svg

The end icon (SVG): https://storage.googleapis.com/material-icons/external-assets/v1/icons/svg/ic_close_white_24px.svg

The Path generated by Vect Align

Start path (drawer_path):
M 3.0,18.0 l 18.0,0.0 l 0.0,-2.0 l -18.0,0.0 l 0.0,2.0 L 3.0,18.0 m 0.0,-5.0 l 18.0,0.0 l 0.0,-2.0 l -18.0,0.0 l 0.0,2.0 L 3.0,13.0 M 3.0,6.0 L 3.0,6.0 L 3.0,6.0 L 3.0,6.0 L 3.0,6.0 L 3.0,6.0 L 3.0,8.0 L 21.0,8.0 L 21.0,6.0 L 3.0,6.0 L 3.0,6.0

End path (close_path):
M 19.0,6.41 l 0.0,0.0 l 0.0,0.0 l 0.0,0.0 l 0.0,0.0 L 17.59,5.0 m 0.0,0.0 l0.0,0.0 l 0.0,0.0 l 0.0,0.0 l 0.0,0.0 L 12.0,10.59 M 12.0,10.59 L 6.41,5.0 L 5.0,6.41 L 10.59,12.0 L 5.0,17.59 L 6.41,19.0 L 12.0,13.41 L 17.59,19.0 L 19.0,17.59 L 13.41,12.0 L 19.0,6.41

Screenshot of the issue
device-2015-11-05-164520

XML Files in the Project:

Vector FIle (ic_drawer.xml):

<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:viewportWidth="24"
    android:viewportHeight="24">

    <path
        android:name="v"
        android:fillColor="#FFFFFF"
        android:pathData="@string/drawer_path" />

</vector>

Animated Vector File (ic_drawer_to_close.xml):

<?xml version="1.0" encoding="utf-8"?>
<animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:drawable="@drawable/ic_drawer">

    <target
        android:name="v"
        android:animation="@anim/drawer_to_close" />

</animated-vector>

The Anim File (drawer_to_close.xml):

<?xml version="1.0" encoding="utf-8"?>
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="650"
    android:propertyName="pathData"
    android:valueFrom="@string/drawer_path"
    android:valueTo="@string/close_path"
    android:valueType="pathType" />

I hope you help me with this issue.

.jar download source is deprecated

Hello!

I tried to download the precompiled .jar but bintray is not hosting it anymore. Can you please set up another source for it?
Cheers,
Best wishes,
Wiktor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.