Package com.kakao.vectormap.label
Class LabelStyle
- java.lang.Object
- 
- com.kakao.vectormap.internal.ILabelStyle
- 
- com.kakao.vectormap.label.LabelStyle
 
 
- 
 public class LabelStyle extends ILabelStyle Label의 Icon 과 Text 스타일을 설정하는 클래스. ZoomLevel 마다 다르게 스타일을 설정할 수 있다.
- 
- 
Field SummaryFields Modifier and Type Field Description floatanchorXfloatanchorYbooleanenableIconTransitionEntrancebooleanenableIconTransitionExitbooleanenableTextTransitionEntrancebooleanenableTextTransitionExitintentranceTransitionintexitTransitionintgravityBitmapiconBitmapinticonResIdfloatpaddinginttextEntranceTransitioninttextExitTransition- 
Fields inherited from class com.kakao.vectormap.internal.ILabelStyleapplyDpScale, assetId, textStyles, zoomLevel
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuild(IMapResourceManager resourceManager)booleanequals(java.lang.Object o)static LabelStylefrom()LabelStyle 객체를 생성한다.static LabelStylefrom(int iconResId)Icon 이미지를 갖는Label의 스타일 객체를 생성한다.static LabelStylefrom(Bitmap iconBitmap)Icon 이미지를 갖는Label의 스타일 객체를 생성한다.static LabelStylefrom(LabelTextStyle... textStyles)LabelTextStyle 을 가지고 LabelStyle 객체를 생성한다.static LabelStylefrom(Context context, int styleResId)styles.xml 에 미리 정의되어 있는 속성들로 LabelStyle 객체를 생성한다.PointFgetAnchorPoint()anchorPoint 값을 가져온다.PointFgetIconAnchor()icon 의 anchor 값을 가져온다.BitmapgetIconBitmap()Icon 에 설정된 비트맵 이미지를 가져온다.intgetIconResId()Icon 에 설정된 이미지 리소스 Id 를 가져온다.LabelTransitiongetIconTransition()Label 의 icon 에 설정 된 LabelTransition 을 가져온다.floatgetPadding()padding 을 가져온다.intgetTextEntranceTransition()Label 의 텍스트 Entrance LabelTransition 을 가져온다.intgetTextExitTransition()Label 의 텍스트 Exit LabelTransition 을 가져온다.intgetTextGravity()텍스트의 MapGravity 를 가져온다.intgetTextStyleCount()텍스트 스타일의 라인마다 갯수를 가져온다.LabelTextStyle[]getTextStyles()Label 의 텍스트 스타일을 가져온다.LabelTransitiongetTextTransition()intgetZoomLevel()zoomLevel 을 가져온다.inthashCode()booleanisApplyDpScale()dpScale 여부를 가져온다.LabelStylesetAnchorPoint(float x, float y)Label 의 위치 좌표를 기준으로 Icon 이미지를 어떻게 배치(gravity)할 지 설정한다.LabelStylesetAnchorPoint(PointF anchor)Label 의 위치 좌표를 기준으로 Icon 이미지를 어떻게 배치(gravity)할 지 설정한다.LabelStylesetApplyDpScale(boolean applyDpScale)dpScale 을 설정한다.LabelStylesetIconTransition(LabelTransition transition)Label이 지도에 나타나고 사라질 때 적용하는 애니메이션을 설정한다.LabelStylesetPadding(float padding)padding 을 설정한다.LabelStylesetTextGravity(int gravity)텍스트의 MapGravity 를 설정한다.LabelStylesetTextStyles(int size, int color)텍스트 크기(size) 와 색깔(color) 로 Label 의 텍스트 스타일을 설정한다.LabelStylesetTextStyles(int size, int color, int strokeSize, int strokeColor)텍스트 크기(size), 색깔(color), 테두리 굵기(strokeSize) 와 테두리 색깔(strokeColor) 로 Label 의 텍스트 스타일을 설정한다.LabelStylesetTextStyles(LabelTextStyle... textStyles)Label 텍스트 스타일을 설정한다.LabelStylesetTextTransition(LabelTransition transition)Label의 텍스트가 지도에 나타나고 사라질 때 적용하는 애니메이션을 설정한다.LabelStylesetZoomLevel(int zoomLevel)LabelStyle 이 적용될 zoomLevel 을 설정한다.
 
- 
- 
- 
Field Detail- 
iconResIdpublic int iconResId 
 - 
iconBitmappublic Bitmap iconBitmap 
 - 
paddingpublic float padding 
 - 
anchorXpublic float anchorX 
 - 
anchorYpublic float anchorY 
 - 
exitTransitionpublic int exitTransition 
 - 
entranceTransitionpublic int entranceTransition 
 - 
textExitTransitionpublic int textExitTransition 
 - 
textEntranceTransitionpublic int textEntranceTransition 
 - 
enableIconTransitionEntrancepublic boolean enableIconTransitionEntrance 
 - 
enableIconTransitionExitpublic boolean enableIconTransitionExit 
 - 
enableTextTransitionEntrancepublic boolean enableTextTransitionEntrance 
 - 
enableTextTransitionExitpublic boolean enableTextTransitionExit 
 - 
gravitypublic int gravity 
 
- 
 - 
Method Detail- 
frompublic static LabelStyle from() LabelStyle 객체를 생성한다.
 - 
frompublic static LabelStyle from(int iconResId) Icon 이미지를 갖는Label의 스타일 객체를 생성한다.- Parameters:
- iconResId- res/drawable 디렉토리에 저장되어 있는 이미지 resourceId. (예: R.drawable.chicken) 기기의 픽셀밀도 구분이 필요없다. 원본 이미지를 가지고 지도 내부적으로 이미지 크기 계산을 한다.
 
 - 
frompublic static LabelStyle from(Bitmap iconBitmap) Icon 이미지를 갖는Label의 스타일 객체를 생성한다. 시스템이 제공하는 픽셀밀도 별 res/drawable 에 있는 이미지를 bitmap 으로 변환할 때는 디렉토리 구분에 따라 크기가 달라진다.- Parameters:
- iconBitmap- Icon 에 넣고자 하는 Bitmap 이미지
 
 - 
frompublic static LabelStyle from(LabelTextStyle... textStyles) LabelTextStyle 을 가지고 LabelStyle 객체를 생성한다.- Parameters:
- textStyles- Label 의 텍스트에 적용 할 텍스트 스타일 정의하는 파라미터.
 
 - 
frompublic static LabelStyle from(Context context, int styleResId) styles.xml 에 미리 정의되어 있는 속성들로 LabelStyle 객체를 생성한다.- Parameters:
- context-
- styleResId- LabelStyle 이 정의 되어 있는 styles 리소스 id.
 
 - 
setPaddingpublic LabelStyle setPadding(float padding) padding 을 설정한다.- Parameters:
- padding- padding 값 (px).
 
 - 
setApplyDpScalepublic LabelStyle setApplyDpScale(boolean applyDpScale) dpScale 을 설정한다.- Parameters:
- applyDpScale- dpScale 적용 여부.
 
 - 
setAnchorPointpublic LabelStyle setAnchorPoint(PointF anchor) Label 의 위치 좌표를 기준으로 Icon 이미지를 어떻게 배치(gravity)할 지 설정한다. 이미지의 가로와 세로 크기를 1.0 으로 기준.- Parameters:
- anchor- anchor 값.
 
 - 
setAnchorPointpublic LabelStyle setAnchorPoint(float x, float y) Label 의 위치 좌표를 기준으로 Icon 이미지를 어떻게 배치(gravity)할 지 설정한다. 이미지의 가로와 세로 크기를 1.0 로 기준.- Parameters:
- x- anchor 의 x 값.
- y- anchor 의 y 값.
 
 - 
setZoomLevelpublic LabelStyle setZoomLevel(int zoomLevel) LabelStyle 이 적용될 zoomLevel 을 설정한다.- Parameters:
- zoomLevel- 적용 할 최소 zoomLevel 값.
 
 - 
setTextStylespublic LabelStyle setTextStyles(LabelTextStyle... textStyles) Label 텍스트 스타일을 설정한다. 추가 된LabelTextStyle의 순서대로 하나의 라인의 텍스트 스타일을 정의한다.- Parameters:
- textStyles- Label 의 텍스트에 적용 할 스타일 정의하는 클래스.
 
 - 
setTextStylespublic LabelStyle setTextStyles(int size, int color) 텍스트 크기(size) 와 색깔(color) 로 Label 의 텍스트 스타일을 설정한다.- Parameters:
- size- 텍스트 크기 (px).
- color- 텍스트 색깔.
 
 - 
setTextStylespublic LabelStyle setTextStyles(int size, int color, int strokeSize, int strokeColor) 텍스트 크기(size), 색깔(color), 테두리 굵기(strokeSize) 와 테두리 색깔(strokeColor) 로 Label 의 텍스트 스타일을 설정한다.- Parameters:
- size- 텍스트 크기 (px).
- color- 텍스트 색깔.
- strokeSize- 텍스트 테두리의 굵기 (px).
- strokeColor- 텍스트 테두리의 색깔.
 
 - 
setIconTransitionpublic LabelStyle setIconTransition(LabelTransition transition) Label이 지도에 나타나고 사라질 때 적용하는 애니메이션을 설정한다.- Parameters:
- transition- Label 이 나타나고 사라질 때 애니메이션을 정의하는 파라미터.
 
 - 
setTextTransitionpublic LabelStyle setTextTransition(LabelTransition transition) Label의 텍스트가 지도에 나타나고 사라질 때 적용하는 애니메이션을 설정한다.- Parameters:
- transition- Label 의 텍스트가 나타나고 사라질 때 애니메이션을 정의하는 파라미터.
 
 - 
getTextEntranceTransitionpublic int getTextEntranceTransition() Label 의 텍스트 Entrance LabelTransition 을 가져온다.
 - 
getTextExitTransitionpublic int getTextExitTransition() Label 의 텍스트 Exit LabelTransition 을 가져온다.
 - 
getZoomLevelpublic int getZoomLevel() zoomLevel 을 가져온다.
 - 
getPaddingpublic float getPadding() padding 을 가져온다.
 - 
getIconAnchorpublic PointF getIconAnchor() icon 의 anchor 값을 가져온다.
 - 
getIconTransitionpublic LabelTransition getIconTransition() Label 의 icon 에 설정 된 LabelTransition 을 가져온다.
 - 
getTextTransitionpublic LabelTransition getTextTransition() 
 - 
getTextStylespublic LabelTextStyle[] getTextStyles() Label 의 텍스트 스타일을 가져온다.
 - 
getTextStyleCountpublic int getTextStyleCount() 텍스트 스타일의 라인마다 갯수를 가져온다.
 - 
isApplyDpScalepublic boolean isApplyDpScale() dpScale 여부를 가져온다.
 - 
buildpublic void build(IMapResourceManager resourceManager) 
 - 
setTextGravitypublic LabelStyle setTextGravity(int gravity) 텍스트의 MapGravity 를 설정한다.- Parameters:
- gravity- 배치를 위한 기준이 되는 상수.
 
 - 
getTextGravitypublic int getTextGravity() 텍스트의 MapGravity 를 가져온다.
 - 
getIconResIdpublic int getIconResId() Icon 에 설정된 이미지 리소스 Id 를 가져온다.
 - 
getIconBitmappublic Bitmap getIconBitmap() Icon 에 설정된 비트맵 이미지를 가져온다.
 - 
getAnchorPointpublic PointF getAnchorPoint() anchorPoint 값을 가져온다.
 - 
equalspublic boolean equals(java.lang.Object o) - Overrides:
- equalsin class- java.lang.Object
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 
- 
 
-