1
我正试图使用此库http://code.google.com/p/svg-android/将SVG转换为android。在Android中缩放SVG?
这里是我到目前为止的代码:
public class main extends Activity {
/** Called when the activity is first created. */
ImageView iv;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
iv = (ImageView)findViewById(R.id.imageView1);
SVG svg = SVGParser.getSVGFromResource(getResources(), R.raw.android);
iv.setImageDrawable(svg.createPictureDrawable());
}
}
而且它绘制SVGpretty好。但是我找不到如何调整它的方法,例如,如果我希望它是100 x 100像素?
任何想法?
对我来说,这已导致像素化结果,这让我很好奇,因为所讨论的SVG完全是基于矢量的。 –