Yollar, Degradeler ve Karıştırma Modları
Karmaşık dolgular ve konturlar oluşturun.
Yollar, Degradeler ve Karıştırma Modları, CoddyKit'te ücretsiz bir Jetpack Compose Academy dersidir. Bu, 4 dersinin 2. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Jetpack Compose Academy öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Jetpack Compose Academy kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Beyond Simple Shapes
Lines and circles are great, but real graphics need curves and rich fills. Meet Path, gradients, and blend modes for that next level.
What Is a Path
A Path is a recorded outline you build point by point. You move and line your way around, then draw the finished shape in one call.
val path = Path()
path.moveTo(0f, 0f)
path.lineTo(100f, 0f)moveTo and lineTo
Use moveTo to lift the pen to a start point, then lineTo to draw straight segments. Chain them to trace any polygon you like.
path.moveTo(0f, 0f)
path.lineTo(80f, 120f)
path.lineTo(160f, 0f)
path.close()Curves with quadraticBezierTo
For smooth bends use quadraticBezierTo. A control point pulls the line into a curve, perfect for soft chart edges.
path.quadraticBezierTo(50f, -40f, 100f, 0f)Draw the Path
Once built, hand the path to drawPath with a color or brush. You can fill it solid or outline it with a Stroke style.
drawPath(path = path, color = Color.Blue)Meet the Brush
A Brush describes how an area is painted. Instead of a flat color, a brush can pour a smooth gradient across your shape.
Linear Gradients
Use Brush.linearGradient to blend colors along a straight line. Pass a list of colors and watch them fade from one to the next.
val brush = Brush.linearGradient(
listOf(Color.Cyan, Color.Magenta)
)
drawRect(brush = brush)Radial Gradients
Reach for Brush.radialGradient to blend outward from a center. It is ideal for spotlights, soft buttons, and glowing orbs.
val glow = Brush.radialGradient(
listOf(Color.White, Color.Blue)
)Sweep Gradients
A Brush.sweepGradient rotates colors around a center point. It is the secret behind colorful progress rings and rainbow dials.
val sweep = Brush.sweepGradient(
listOf(Color.Red, Color.Yellow, Color.Red)
)Meet Blend Modes
A BlendMode decides how a new shape mixes with what is already drawn. Multiply darkens, Screen lightens, and Plus adds light.
drawCircle(
color = Color.Yellow,
blendMode = BlendMode.Multiply
)Layer for Effects
Blend modes shine when shapes overlap. Stack two translucent circles with BlendMode.Plus and their intersection glows brighter.
Quick Check
Which brush rotates colors around a center point?
Recap
You can now build curves with Path, fill shapes with linear, radial, and sweep gradients, and combine them using blend modes. Time to get creative! ✨
Sıkça Sorulan Sorular
“Yollar, Degradeler ve Karıştırma Modları” dersi ücretsiz mi?
Evet — “Yollar, Degradeler ve Karıştırma Modları” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Jetpack Compose Academy kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Jetpack Compose Academy kursu toplamda 4 dersten oluşur.
“Yollar, Degradeler ve Karıştırma Modları” dersinde ne öğreneceğim?
Karmaşık dolgular ve konturlar oluşturun. Jetpack Compose Academy ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
Jetpack Compose Academy öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te Jetpack Compose Academy, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 2. dersidir.
“Yollar, Degradeler ve Karıştırma Modları” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu Jetpack Compose Academy dersinde kod yazıp çalıştırabilir miyim?
Evet. Her Jetpack Compose Academy dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- DrawScope: Çizgiler, Dikdörtgenler ve Daireler
- Yollar, Degradeler ve Karıştırma Modları
- drawWithCache ve Performans
- Canlı İlerleme Halkası Oluşturma