Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
LCL
»
Canvas, TShape ... Rectangle with pointed corners (no missing pixels)
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
[SOLVED] Program compiles...
by
Schmitty2005
[
Today
at 07:35:39 pm]
Introducing PasBuild 1.0....
by
Graeme
[
Today
at 06:58:58 pm]
TIBDataSet "Closing"? on ...
by
RedOctober
[
Today
at 05:00:04 pm]
So many "newbies"
by
gidesa
[
Today
at 04:18:38 pm]
How can I make a safe app...
by
LeP
[
Today
at 03:30:34 pm]
Lazreport. Multiple print...
by
paweld
[
Today
at 03:12:47 pm]
[SOLVED] Need help conver...
by
srvaldez
[
Today
at 01:52:33 pm]
SpkToolbar custom update
by
wp
[
Today
at 01:48:16 pm]
OS/2 Warp 4 problem with ...
by
Thaddy
[
Today
at 01:35:10 pm]
Is FPGUI still active?
by
BSaidus
[
Today
at 01:25:31 pm]
Bitmap into Paintbox
by
BubikolRamios
[
Today
at 12:58:20 pm]
Notetask 1.1.0 - Free cro...
by
AlexanderT
[
Today
at 12:11:14 pm]
Matching video to form
by
Pe3s
[
Today
at 10:56:47 am]
Is Lazarus' Tool Palette ...
by
Ed78z
[
Today
at 10:37:03 am]
[SOLVED] RXSwitch
by
Petrus Vorster
[
Today
at 10:35:00 am]
fpsockets error: 10047
by
rvk
[
Today
at 09:50:08 am]
Has anyone installed TeeB...
by
egsuh
[
Today
at 09:10:09 am]
Military Grade Directives
by
Thaddy
[
Today
at 08:56:12 am]
Permutation of rows and c...
by
Zvoni
[
Today
at 08:33:20 am]
Jacks or Better card game...
by
TBMan
[
Today
at 03:12:03 am]
Strings and special chara...
by
TBMan
[
Today
at 12:08:26 am]
Mapping Images Like Odome...
by
SandyG
[December 10, 2025, 05:22:27 pm]
Using WriteLn inside dll
by
Thaddy
[December 10, 2025, 04:16:20 pm]
Hello everyone!
by
Curt Carpenter
[December 10, 2025, 03:55:40 pm]
Avoid system units debugg...
by
janasoft
[December 10, 2025, 12:13:42 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Canvas, TShape ... Rectangle with pointed corners (no missing pixels) (Read 1181 times)
RAW
Hero Member
Posts: 871
Canvas, TShape ... Rectangle with pointed corners (no missing pixels)
«
on:
August 12, 2019, 08:12:07 pm »
Obviously I'm missing something ... Can someone explain how to get real pointed corners (Canvas, TShape: Rectangle)?
Code: Pascal
[Select]
[+]
[-]
unit
Unit1
;
{$mode objfpc}{$H+}
interface
uses
Classes
,
SysUtils
,
Forms
,
Controls
,
Graphics
,
ExtCtrls
;
type
TForm1
=
class
(
TForm
)
procedure
FormPaint
(
Sender
:
TObject
)
;
procedure
FormCreate
(
Sender
:
TObject
)
;
end
;
var
Form1
:
TForm1
;
implementation
{$R *.lfm}
procedure
TForm1
.
FormPaint
(
Sender
:
TObject
)
;
begin
Canvas
.
Pen
.
Width
:
=
6
;
Canvas
.
Pen
.
Color
:
=
RGBToColor
(
0
,
80
,
255
)
;
Canvas
.
Rectangle
(
400
,
100
,
800
,
400
)
;
Canvas
.
Pen
.
Color
:
=
clRed
;
Canvas
.
Frame
(
300
,
300
,
600
,
600
)
;
end
;
procedure
TForm1
.
FormCreate
(
Sender
:
TObject
)
;
var
shp
:
TShape
;
begin
Color
:
=
clWhite
;
shp
:
=
TShape
.
Create
(
Self
)
;
shp
.
Shape
:
=
stRectangle
;
shp
.
Pen
.
Color
:
=
RGBToColor
(
0
,
80
,
255
)
;
shp
.
Pen
.
Width
:
=
6
;
shp
.
SetBounds
(
100
,
100
,
200
,
100
)
;
shp
.
Parent
:
=
Self
;
end
;
end
.
Logged
wp
Hero Member
Posts: 13268
Re: Canvas, TShape ... Rectangle with pointed corners (no missing pixels)
«
Reply #1 on:
August 12, 2019, 09:50:25 pm »
Set the pen's JoinStyle to pjsMiter
Logged
RAW
Hero Member
Posts: 871
Re: Canvas, TShape ... Rectangle with pointed corners (no missing pixels)
«
Reply #2 on:
August 12, 2019, 10:22:01 pm »
Ah, JoinStyle ... Thank you very much, next time I need to take a closer look!
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
LCL
»
Canvas, TShape ... Rectangle with pointed corners (no missing pixels)
TinyPortal
© 2005-2018