با سلام و عرض ادب امروز قرار است شکل مستطیل رو با تمام ویژگی ها به شما نشون بدم
برای ایجاد یک مستطیل شما باید اون رو بصورت زیر ایجاد کنید
var rect1 = new Konva.Rect({})
در قسمت بالا داخل {} ویزگی های شکل قرار میگیره که بصورت ذیل است
نام | نوع داده | وضعیت | توضیحات |
---|---|---|---|
cornerRadius | عددی | اختیاری | گرد شدن گوشه ها |
fill | متنی | اختیاری |
رنگ زمینه |
fillPatternImage
| تصویر | اختیاری |
تصویر زمینه |
fillPatternX
| عددی | اختیاری | تصویر زمینه در محوریت x |
fillPatternY
| عددی | اختیاری | تصویر زمینه در محوریت y |
fillPatternOffset
| آبجکت | اختیاری |
تصویر در محوریت x و y |
fillPatternOffsetX
| عددی | اختیاری | تصویر در محوریت x |
fillPatternOffsetY
| عددی | اختیاری | تصویر در محوریت y |
fillPatternScale
| آبجکت | اختیاری |
مقیاس تصویر در محوریت x , y |
fillPatternScaleX
| عددی | اختیاری | مقایس تصویر در محوریت x |
fillPatternScaleY
| عددی | اختیاری | مقیاس تصویر در محوریت y |
fillPatternRotation
| عددی | اختیاری | چرخش تصویر |
fillPatternRepeat
| متنی | اختیاری | محوریت تکرار تصویر |
fillLinearGradientStartPoint
| آبجکت | اختیاری | گرادینت زمینه |
fillLinearGradientStartPointX
| عددی | اختیاری | |
fillLinearGradientStartPointY
| عددی | اختیاری | |
fillLinearGradientEndPoint
| آبجکت | اختیاری | پایان گرادینت خطی x,y |
fillLinearGradientEndPointX
| عددی | اختیاری | پایان گرادینت خطی x |
fillLinearGradientEndPointY
| عددی | اختیاری | پایان گرادینت خطی y |
fillLinearGradientColorStops
| آرایه | اختیاری |
array of color stops |
fillRadialGradientStartPoint
| آبجکت | اختیاری |
object with x and y component |
fillRadialGradientStartPointX
| عددی | اختیاری | |
fillRadialGradientStartPointY
| عددی | اختیاری | |
fillRadialGradientEndPoint
| آبجکت | اختیاری |
object with x and y component |
fillRadialGradientEndPointX
| عددی | اختیاری | |
fillRadialGradientEndPointY
| عددی | اختیاری | |
fillRadialGradientStartRadius
| عددی | اختیاری | |
fillRadialGradientEndRadius
| عددی | اختیاری | |
fillRadialGradientColorStops
| آرایه | اختیاری |
array of color stops |
fillEnabled
| منطقی (true , false) | اختیاری | فعال یا غیر فعال بودن ویژگی پرشدن با تصویر ، رنگ یا گرادینت که بصورت عادی true است |
fillPriority
| متنی | اختیاری | نوع پرشدن را مشخص می کند به این صورت می توان رنگ یا پترن یا تصویر یا گرادینت باشد |
stroke
| متنی | اختیاری | رنگ خطوط |
strokeWidth
| عددی | اختیاری | ضخامت خطوط |
fillAfterStrokeEnabled
| منطقی (true , false) | اختیاری |
Should we draw fill AFTER stroke? Default is false. |
hitStrokeWidth
| عددی | اختیاری |
size of the stroke on hit canvas.The default is “auto” – equals to strokeWidth |
strokeHitEnabled
| منطقی (true , false) | اختیاری |
flag which enables or disables stroke hit region.The default is true |
perfectDrawEnabled
| منطقی (true , false) | اختیاری |
flag which enables or disables using buffer canvas.The default is true |
shadowForStrokeEnabled
| منطقی (true , false) | اختیاری |
flag which enables or disables shadow for stroke.The default is true |
strokeScaleEnabled
| منطقی (true , false) | اختیاری |
flag which enables or disables stroke scale.The default is true |
strokeEnabled
| منطقی (true , false) | اختیاری |
flag which enables or disables the stroke.The default value is true |
lineJoin
| متنی | اختیاری |
can be miter, round, or bevel.The default |
lineCap
| متنی | اختیاری |
can be butt, round, or square.The default |
shadowColor
| متنی | اختیاری | |
shadowBlur
| عددی | اختیاری | |
shadowOffset
| آبجکت | اختیاری |
object with x and y component |
shadowOffsetX
| عددی | اختیاری | |
shadowOffsetY
| عددی | اختیاری | |
shadowOpacity
| عددی | اختیاری |
shadow opacity.Can be any real number |
shadowEnabled
| منطقی (true , false) | اختیاری |
flag which enables or disables the shadow.The default value is true |
dash
| آرایه | اختیاری | |
dashEnabled
| منطقی (true , false) | اختیاری |
flag which enables or disables the dashArray.The default value is true |
x
| عددی | اختیاری | |
y
| عددی | اختیاری | |
width
| عددی | اختیاری | |
height
| عددی | اختیاری | |
visible
| منطقی (true , false) | اختیاری | |
listening
| منطقی (true , false) | اختیاری |
whether or not the node is listening for events |
id
| متنی | اختیاری |
unique id |
name
| متنی | اختیاری |
non-unique name |
opacity
| عددی | اختیاری |
determines node opacity.Can be any number between 0 and 1 |
scale
| آبجکت | اختیاری |
set scale |
scaleX
| عددی | اختیاری |
set scale x |
scaleY
| عددی | اختیاری |
set scale y |
rotation
| عددی | اختیاری |
rotation in degrees |
offset
| آبجکت | اختیاری |
offset from center point and rotation point |
offsetX
| عددی | اختیاری |
set offset x |
offsetY
| عددی | اختیاری |
set offset y |
draggable
| منطقی (true , false) | اختیاری |
makes the node draggable.When stages are draggable, you can drag and drop |
dragDistance
| عددی | اختیاری | |
dragBoundFunc
| تابع (function) | اختیاری |