Coder Social home page Coder Social logo

lerist / svgtoandroid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from misakuo/svgtoandroid

0.0 3.0 0.0 308 KB

An Intellij platform plugin for transforming SVG to android VectorDrawable

Home Page: https://plugins.jetbrains.com/plugin/8103

License: MIT License

Java 100.00%

svgtoandroid's Introduction

##SVG2VectorDrawable Android Arsenal
English


###简介 一个Intellij Platform插件,通过其可以完成从*.svg文件到Android VectorDrawable的转换。
###特性

  • 图形化界面
  • 自动解析当前Project,如果当前Project为Android Project,则会列出所有Module
  • 支持将SVG解析为多种dpi的VectorDrawable

###属性对应

SVG Attribute VectorDrawable Attribute
id android:name
fill android:fillColor
fill-opacity android:fillAlpha
stroke android:strokeColor
stroke-opacity android:strokeAlpha
stroke-width android:strokeWidth
stroke-linejoin android:strokeLineJoin
stroke-miterlimit android:strokeMiterLimit
stroke-linecap android:lineCap

###使用 ####安装
本插件支持Intellij IDEA和Android Studio,需要JDK版本1.6及以上
#####通过jar文件安装 从此处 下载SVG2VectorDrawable.jar 文件,从IDE中打开 Preferences -> Plugins -> Install plugin from disk... 选择 SVG2VectorDrawable.jar ,添加后重启IDE即可在工具栏上看到插件图标 #####通过插件仓库安装 在IDE中打开Preferences -> Plugins -> Browse Repositories,搜索SVG2VectorDrawable,安装插件并重启IDE ####图形界面
img1 ####用法

  • 点击···按钮,选择SVG源文件
  • 在第一个下拉选框中选中要生成xml文件的module,在第二个选框中选择生成VectorDrawable对应的分辨率,在module中已存在的分辨率目录为黑色字体,未存在的目录为灰色字体,如果选中不存在的目录,则插件会自动生成该目录
  • 填入生成xml文件的文件名,默认为vector_drawable_ + SVG文件的名称
  • 点击Generate,插件会生成xml并在编辑器中打开(如果文件名对应的xml已存在,则会覆盖原来的内容)

###Todos

  • 支持SVG的transform属性

欢迎提交Issue和PR


Reference: svg2vectordrawable

svgtoandroid's People

Contributors

misakuo avatar

Watchers

James Cloos avatar Lerist avatar  avatar

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.