com.android.ide.common.vectordrawable
Class VdPreview.TargetSize

java.lang.Object
  extended by com.android.ide.common.vectordrawable.VdPreview.TargetSize
Enclosing class:
VdPreview

public static class VdPreview.TargetSize
extends java.lang.Object

This encapsulates the information used to determine the preview image size. The reason we have different ways here is that both Studio UI and build process need to use this common code path to generate images for vectordrawable. When mUseWidth is true, use mImageMaxDimension as the maximum dimension value while keeping the aspect ratio. Otherwise, use mImageScale to scale the image based on the XML's size information.


Method Summary
static VdPreview.TargetSize createSizeFromScale(float imageScale)
           
static VdPreview.TargetSize createSizeFromWidth(int imageWidth)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createSizeFromWidth

public static VdPreview.TargetSize createSizeFromWidth(int imageWidth)

createSizeFromScale

public static VdPreview.TargetSize createSizeFromScale(float imageScale)