|
Dobrý dden, četl jsem váš článek a velmi mne zaujal, zkusil jsem vykreslit "pruhovaného sněhuláka" (viz. program níže), tak aby byl celý takto pruhovaný až do středů jednotlivých kruhů, musíte uznat že je tento program opravdu velmi dlouhý... Public Class Form1 Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Form1_Paint(sender As Object, e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint Dim a As New Pen(Color.DarkBlue, 4) Dim b As New Pen(Color.LightBlue, 4) e.Graphics.DrawEllipse(a, 50, 0, 150, 150) e.Graphics.DrawEllipse(a, 25, 150, 200, 200) e.Graphics.DrawEllipse(a, 0, 350, 250, 250) e.Graphics.DrawEllipse(b, 54, 4, 142, 142) e.Graphics.DrawEllipse(b, 29, 154, 192, 192) e.Graphics.DrawEllipse(b, 4, 354, 242, 242) e.Graphics.DrawEllipse(a, 58, 8, 134, 134) e.Graphics.DrawEllipse(a, 33, 158, 184, 184) e.Graphics.DrawEllipse(a, 8, 358, 234, 234) e.Graphics.DrawEllipse(b, 62, 12, 126, 126) e.Graphics.DrawEllipse(b, 37, 162, 176, 176) e.Graphics.DrawEllipse(b, 12, 362, 226, 226) e.Graphics.DrawEllipse(a, 66, 16, 118, 118) e.Graphics.DrawEllipse(a, 41, 166, 168, 168) e.Graphics.DrawEllipse(a, 16, 366, 218, 218) e.Graphics.DrawEllipse(b, 70, 20, 110, 110) e.Graphics.DrawEllipse(b, 45, 170, 160, 160) e.Graphics.DrawEllipse(b, 20, 370, 210, 210) e.Graphics.DrawEllipse(a, 50, 0, 150, 150) e.Graphics.DrawEllipse(a, 25, 150, 200, 200) e.Graphics.DrawEllipse(a, 0, 350, 250, 250) e.Graphics.DrawEllipse(b, 54, 4, 142, 142) e.Graphics.DrawEllipse(b, 29, 154, 192, 192) e.Graphics.DrawEllipse(b, 4, 354, 242, 242) e.Graphics.DrawEllipse(a, 58, 8, 134, 134) e.Graphics.DrawEllipse(a, 33, 158, 184, 184) e.Graphics.DrawEllipse(a, 8, 358, 234, 234) e.Graphics.DrawEllipse(b, 62, 12, 126, 126) e.Graphics.DrawEllipse(b, 37, 162, 176, 176) e.Graphics.DrawEllipse(b, 12, 362, 226, 226) e.Graphics.DrawEllipse(a, 50, 0, 150, 150) e.Graphics.DrawEllipse(a, 25, 150, 200, 200) e.Graphics.DrawEllipse(a, 0, 350, 250, 250) e.Graphics.DrawEllipse(b, 54, 4, 142, 142) e.Graphics.DrawEllipse(b, 29, 154, 192, 192) e.Graphics.DrawEllipse(b, 4, 354, 242, 242) e.Graphics.DrawEllipse(a, 58, 8, 134, 134) e.Graphics.DrawEllipse(a, 33, 158, 184, 184) e.Graphics.DrawEllipse(a, 8, 358, 234, 234) e.Graphics.DrawEllipse(b, 62, 12, 126, 126) e.Graphics.DrawEllipse(b, 37, 162, 176, 176) e.Graphics.DrawEllipse(b, 12, 362, 226, 226) e.Graphics.DrawEllipse(a, 66, 16, 118, 118) e.Graphics.DrawEllipse(a, 41, 166, 168, 168) e.Graphics.DrawEllipse(a, 16, 366, 218, 218) e.Graphics.DrawEllipse(b, 70, 20, 118, 118) e.Graphics.DrawEllipse(b, 45, 170, 168, 168) e.Graphics.DrawEllipse(b, 20, 370, 218, 218) e.Graphics.DrawEllipse(a, 50, 0, 150, 150) e.Graphics.DrawEllipse(a, 25, 150, 200, 200) e.Graphics.DrawEllipse(a, 0, 350, 250, 250) e.Graphics.DrawEllipse(b, 54, 4, 142, 142) e.Graphics.DrawEllipse(b, 29, 154, 192, 192) e.Graphics.DrawEllipse(b, 4, 354, 242, 242) e.Graphics.DrawEllipse(a, 58, 8, 134, 134) e.Graphics.DrawEllipse(a, 33, 158, 184, 184) e.Graphics.DrawEllipse(a, 8, 358, 234, 234) e.Graphics.DrawEllipse(b, 62, 12, 126, 126) e.Graphics.DrawEllipse(b, 37, 162, 176, 176) e.Graphics.DrawEllipse(b, 12, 362, 226, 226) e.Graphics.DrawEllipse(a, 66, 16, 118, 118) e.Graphics.DrawEllipse(a, 41, 166, 168, 168) e.Graphics.DrawEllipse(a, 16, 366, 218, 218) e.Graphics.DrawEllipse(b, 70, 20, 118, 118) e.Graphics.DrawEllipse(b, 45, 170, 168, 168) e.Graphics.DrawEllipse(b, 20, 370, 218, 218) e.Graphics.DrawEllipse(b, 54, 4, 142, 142) e.Graphics.DrawEllipse(b, 29, 154, 192, 192) e.Graphics.DrawEllipse(b, 4, 354, 242, 242) e.Graphics.DrawEllipse(a, 58, 8, 134, 134) e.Graphics.DrawEllipse(a, 33, 158, 184, 184) e.Graphics.DrawEllipse(a, 8, 358, 234, 234) e.Graphics.DrawEllipse(b, 62, 12, 126, 126) e.Graphics.DrawEllipse(b, 37, 162, 176, 176) e.Graphics.DrawEllipse(b, 12, 362, 226, 226) e.Graphics.DrawEllipse(a, 66, 16, 118, 118) e.Graphics.DrawEllipse(a, 41, 166, 168, 168) e.Graphics.DrawEllipse(a, 16, 366, 218, 218) e.Graphics.DrawEllipse(b, 70, 20, 118, 118) e.Graphics.DrawEllipse(b, 45, 170, 168, 168) e.Graphics.DrawEllipse(b, 20, 370, 218, 218) e.Graphics.DrawEllipse(a, 50, 0, 150, 150) e.Graphics.DrawEllipse(a, 25, 150, 200, 200) e.Graphics.DrawEllipse(a, 0, 350, 250, 250) e.Graphics.DrawEllipse(b, 54, 4, 142, 142) e.Graphics.DrawEllipse(b, 29, 154, 192, 192) e.Graphics.DrawEllipse(b, 4, 354, 242, 242) e.Graphics.DrawEllipse(a, 58, 8, 134, 134) e.Graphics.DrawEllipse(a, 33, 158, 184, 184) e.Graphics.DrawEllipse(a, 8, 358, 234, 234) e.Graphics.DrawEllipse(b, 62, 12, 126, 126) e.Graphics.DrawEllipse(b, 37, 162, 176, 176) e.Graphics.DrawEllipse(b, 12, 362, 226, 226) e.Graphics.DrawEllipse(a, 66, 16, 118, 118) e.Graphics.DrawEllipse(a, 41, 166, 168, 168) e.Graphics.DrawEllipse(a, 16, 366, 218, 218) End Sub End Class Drosím vás tedy o radu jak tento program zkrátit. Děkuji předem
|