Create Paint Using C#, Graphics in C#

  Рет қаралды 13,486

Coding with Libino

Coding with Libino

Күн бұрын

Пікірлер: 28
@RexmondSavadera
@RexmondSavadera 6 ай бұрын
Thank you Very much your tutorial is very helpful and useful
@codingwithlibino
@codingwithlibino 3 ай бұрын
Thank you
@jesusaurelioperezcota3706
@jesusaurelioperezcota3706 7 ай бұрын
Increible video me ayudó muchisimo, Muchas graciaas bendiciones!! :D
@codingwithlibino
@codingwithlibino 3 ай бұрын
Thank you
@creatingcreations8647
@creatingcreations8647 3 жыл бұрын
Super bro please also make more shapes and brushes
@codingwithlibino
@codingwithlibino 3 жыл бұрын
Ok sure bro
@creatingcreations8647
@creatingcreations8647 3 жыл бұрын
@@codingwithlibino thanks bro 😊
@codingwithlibino
@codingwithlibino 8 ай бұрын
kzbin.info/www/bejne/Y4i0qGeDqsmLb8k
@gustavooliveira2662
@gustavooliveira2662 Жыл бұрын
Certified by gustavo
@codingwithlibino
@codingwithlibino Жыл бұрын
Thank you
@codingwithlibino
@codingwithlibino 8 ай бұрын
kzbin.info/www/bejne/Y4i0qGeDqsmLb8k
@creatingcreations8647
@creatingcreations8647 3 жыл бұрын
Bro waiting for new tutorials😯
@codingwithlibino
@codingwithlibino 8 ай бұрын
kzbin.info/www/bejne/Y4i0qGeDqsmLb8k
@codingwithlibino
@codingwithlibino 3 жыл бұрын
For Downloads Blogspot : dotnetintamils.blogspot.com/2021/06/create-paint-using-c.html using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Imaging; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace AdvancePaint { public partial class Form1 : Form { Bitmap bm; Graphics g; bool paint = false; Point px, py; Pen p = new Pen(Color.Black,1); Pen Eraser = new Pen(Color.White, 10); int index; int x, y, sx, sy, cx, cy; Color New_Color; ColorDialog cd = new ColorDialog(); public Form1() { InitializeComponent(); bm = new Bitmap(Pic.Width, Pic.Height); g = Graphics.FromImage(bm); g.Clear(Color.White); Pic.Image = bm; } private void BtnPencil_Click(object sender, EventArgs e) { index = 1; } private void Pic_MouseDown(object sender, MouseEventArgs e) { paint = true; py = e.Location; cx = e.X; cy = e.Y; } private void Pic_MouseMove(object sender, MouseEventArgs e) { if(paint) { if(index==1) { px = e.Location; g.DrawLine(p, px, py); py = px; } if (index == 2) { px = e.Location; g.DrawLine(Eraser, px, py); py = px; } } Pic.Refresh(); x = e.X; y = e.Y; sx = e.X - cx; sy = e.Y - cy; } private void Pic_MouseUp(object sender, MouseEventArgs e) { paint = false; sx = x - cx; sy = y - cy; if(index==3) { g.DrawEllipse(p, cx, cy, sx, sy); } if (index == 4) { g.DrawRectangle(p, cx, cy, sx, sy); } if (index == 5) { g.DrawLine(p, cx, cy, x, y); } } private void BtnEraser_Click(object sender, EventArgs e) { index = 2; } private void BtnEllipse_Click(object sender, EventArgs e) { index = 3; } private void BtnRectangle_Click(object sender, EventArgs e) { index = 4; } private void BtnLine_Click(object sender, EventArgs e) { index = 5; } private void Pic_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; if (paint) { if (index == 3) { g.DrawEllipse(p, cx, cy, sx, sy); } if (index == 4) { g.DrawRectangle(p, cx, cy, sx, sy); } if (index == 5) { g.DrawLine(p, cx, cy, x, y); } } } private void BtnClear_Click(object sender, EventArgs e) { g.Clear(Color.White); Pic.Image = bm; index = 0; } private void BtnPaint_Click(object sender, EventArgs e) { index = 6; } static Point set_Point(PictureBox pb,Point pt) { float px = 1f * pb.Width / pb.Width; float py = 1f * pb.Height / pb.Height; return new Point((int)(pt.X * px), (int)(pt.Y * py)); } private void Validate(Bitmap bm,Stacksp,int x,int y,Color Old_Color,Color New_Color) { Color cx = bm.GetPixel(x, y); if(cx==Old_Color) { sp.Push(new Point(x, y)); bm.SetPixel(x, y, New_Color); } } public void Fill(Bitmap bm,int x,int y, Color New_Clr) { Color Old_Color = bm.GetPixel(x, y); Stack pixel=new Stack(); pixel.Push(new Point(x, y)); bm.SetPixel(x, y, New_Clr); if (Old_Color == New_Clr) { return; } while(pixel.Count>0) { Point pt = (Point)pixel.Pop(); if(pt.X>0 && pt.Y>0 && pt.X
@asmaaahmed857
@asmaaahmed857 2 жыл бұрын
Please I want to make the white background a picture that I can add and draw on
@codingwithlibino
@codingwithlibino 2 жыл бұрын
You can add rectangle white color
@asmaaahmed857
@asmaaahmed857 2 жыл бұрын
@@codingwithlibino What is the method that enables me to draw on a picture box?
@codingwithlibino
@codingwithlibino 8 ай бұрын
kzbin.info/www/bejne/Y4i0qGeDqsmLb8k
@batyrkhanakzholov9640
@batyrkhanakzholov9640 2 жыл бұрын
Привед С лодзи
@MaxCorter
@MaxCorter Жыл бұрын
Привет с Огайо
@codingwithlibino
@codingwithlibino 8 ай бұрын
kzbin.info/www/bejne/Y4i0qGeDqsmLb8k
Capture Screenshot using c#
9:39
Coding with Libino
Рет қаралды 582
C# How to Use Paint and the C# Graphics Class to Draw Lines
37:36
Chris Merritt
Рет қаралды 198 М.
Real Man relocate to Remote Controlled Car 👨🏻➡️🚙🕹️ #builderc
00:24
Mia Boyka х Карен Акопян | ЧТО БЫЛО ДАЛЬШЕ?
1:21:14
Что было дальше?
Рет қаралды 12 МЛН
PRANK😂 rate Mark’s kick 1-10 🤕
00:14
Diana Belitskay
Рет қаралды 8 МЛН
У вас там какие таланты ?😂
00:19
Карина Хафизова
Рет қаралды 23 МЛН
C# how to create a simple graphic editor - part 1
19:54
Dawisko1
Рет қаралды 96 М.
C# Drawing Application Tutorial: Part 1
18:52
Dokami
Рет қаралды 18 М.
Paint Clone in Python
29:17
NeuralNine
Рет қаралды 15 М.
C# .NET Windows Form | СОЗДАЁМ PAINT НА C#
23:40
ChannelOf TwoGentlemen
Рет қаралды 55 М.
.NET and C# are in trouble. Here is what I'd do.
10:57
Ed Andersen
Рет қаралды 96 М.
C# Winform Paint
11:27
Mr Programmer
Рет қаралды 96 М.
«Осень». Самая большая загадка Windows XP
14:36
Девять десятых
Рет қаралды 1,1 МЛН
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Рет қаралды 4,1 МЛН
Why 4d geometry makes me sad
29:42
3Blue1Brown
Рет қаралды 664 М.
Real Man relocate to Remote Controlled Car 👨🏻➡️🚙🕹️ #builderc
00:24