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
LRS Editor: A New Tool fo...
by
Xenno
[
Today
at 12:35:53 pm]
Font Name properties
by
J-G
[
Today
at 12:27:41 pm]
Amigo programming languag...
by
paxscript
[
Today
at 12:20:43 pm]
[SOLVED] How to draw on c...
by
artem101
[
Today
at 12:19:48 pm]
Why does Free Pascal use ...
by
tetrastes
[
Today
at 12:10:14 pm]
TlsLib4Pascal
by
Xor-el
[
Today
at 12:05:50 pm]
Synedit wordwrap
by
Martin_fr
[
Today
at 11:53:26 am]
array values as reference
by
Thaddy
[
Today
at 10:10:10 am]
P.I.S.S. a PlugIn-framewo...
by
cdbc
[
Today
at 10:06:41 am]
Proper name for free meth...
by
Thaddy
[
Today
at 08:28:56 am]
BS Controls – Silly Compo...
by
Xenno
[
Today
at 06:53:52 am]
Adding persistent fields ...
by
paweld
[
Today
at 06:11:57 am]
QGradientTrackPanel: A Fu...
by
Ed78z
[
Today
at 01:24:17 am]
Solved: Picture Framer (R...
by
Boleeman
[
Today
at 12:20:27 am]
Lazarus Vs Codetyphon
by
BSaidus
[August 16, 2026, 09:59:46 pm]
MR - DebuggerIntf for ter...
by
Martin_fr
[August 16, 2026, 08:21:29 pm]
Is it possible to communi...
by
Warfley
[August 16, 2026, 08:15:43 pm]
LRS Explorer
by
Xenno
[August 16, 2026, 07:27:54 pm]
[Solved] The use of EXIT ...
by
440bx
[August 16, 2026, 07:27:20 pm]
TEDit PasswordChar not wo...
by
Hansaplast
[August 16, 2026, 05:19:01 pm]
Which Linux version
by
cdbc
[August 15, 2026, 08:28:37 pm]
[Qt5/Qt6] JPSupport-Qt: J...
by
shortcut
[August 15, 2026, 08:19:29 pm]
FpDebug: Bugs and API gap...
by
Martin_fr
[August 15, 2026, 08:07:50 pm]
Unleashed Pascal (async/a...
by
chamfay
[August 15, 2026, 10:35:09 am]
TDWEdit
by
docno
[August 15, 2026, 10:12:10 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Canvas, TShape ... Rectangle with pointed corners (no missing pixels) (Read 1257 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: 13649
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