ব্রাশ API
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
{% setvar compose_or_views "কম্পোজ" %}
{% অন্তর্ভুক্ত "/develop/ui/compose/touch-input/stylus-input/includes/___ink-api-brush-apis" %}
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Brush APIs\n\nThe [`Brush`](/reference/kotlin/androidx/ink/brush/Brush) APIs provide you with\nthe tools to define the visual style of your strokes. You can create brushes\nwith different colors, sizes, and families to achieve a variety of looks.\n\nCreate a brush\n--------------\n\nTo create a brush, use the [`Brush`](/reference/kotlin/androidx/ink/brush/Brush)\nfactory methods such as\n[`createWithColorIntArgb()`](/reference/kotlin/androidx/ink/brush/Brush#createWithColorIntArgb(androidx.ink.brush.BrushFamily,kotlin.Int,kotlin.Float,kotlin.Float))\nclass. The factory methods let you set the following properties:\n\n- **family** : The style of the brush, analogous to a typeface or font in text. See [`StockBrushes`](/reference/kotlin/androidx/ink/brush/StockBrushes) for available [`BrushFamily`](/reference/kotlin/androidx/ink/brush/BrushFamily) values.\n- **color** : The color of the brush. You can set the color using a [`ColorLong`](/reference/kotlin/androidx/annotation/ColorLong) or [`ColorInt`](/reference/androidx/annotation/ColorInt).\n- **size**: The overall thickness of strokes created with the brush.\n- **epsilon**: The smallest distance for which two points should be considered visually distinct for stroke generation geometry purposes. The ratio of epsilon and stroke points control how much a stroke can be zoomed in without artifacts at the cost of memory. A good starting point for stroke units is 1px, and a good starting point for epsilon is 0.1. Higher epsilon values use less memory but allow for less zoom before triangle artifacts appear; experiment to find the right value for your use case.\n\n val brush = Brush.createWithColorIntArgb(\n family = StockBrushes.pressurePenLatest,\n colorIntArgb = Color.Black.toArgb(),\n size = 5F,\n epsilon = 0.1F\n )\n\nModify brush properties\n-----------------------\n\nYou can create a copy of an existing brush using the\n[`copy()`](/reference/kotlin/androidx/ink/brush/Brush#copy(androidx.ink.brush.BrushFamily,kotlin.Float,kotlin.Float))\nmethod. This method lets you change any of the brush's properties. \n\n val redBrush = Brush.createWithColorIntArgb(\n family = StockBrushes.pressurePenLatest,\n colorIntArgb = Color.RED.toArgb(),\n size = 5F,\n epsilon = 0.1F\n )\n\n val blueBrush = redBrush.copy(colorIntArgb = Color.BLUE.toArgb())"]]