mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 01:37:12 +01:00
example: scanline: using black instead of gray, for better contrast
git-svn-id: trunk@12317 -
This commit is contained in:
parent
87d3f98b51
commit
a2c2fa0c0d
@ -6,16 +6,17 @@ object Form1: TForm1
|
||||
HorzScrollBar.Page = 622
|
||||
VertScrollBar.Page = 143
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 144
|
||||
ClientWidth = 623
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
OnPaint = FormPaint
|
||||
object Label1: TLabel
|
||||
Left = 156
|
||||
Height = 13
|
||||
Height = 43
|
||||
Top = 42
|
||||
Width = 407
|
||||
Caption = 'You should see a small rectangle filled with gray and a diagonal red line'
|
||||
Color = clNone
|
||||
Width = 348
|
||||
Caption = 'You should see a small rectangle filled with black and a diagonal red line'
|
||||
ParentColor = False
|
||||
WordWrap = True
|
||||
end
|
||||
|
||||
@ -3,9 +3,9 @@
|
||||
LazarusResources.Add('TForm1','FORMDATA',[
|
||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'"'#1#6'Height'#3#144#0#3'Top'#3#189#0#5'W'
|
||||
+'idth'#3'o'#2#18'HorzScrollBar.Page'#3'n'#2#18'VertScrollBar.Page'#3#143#0#7
|
||||
+'Caption'#6#5'Form1'#8'OnCreate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDest'
|
||||
+'roy'#7'OnPaint'#7#9'FormPaint'#0#6'TLabel'#6'Label1'#4'Left'#3#156#0#6'Heig'
|
||||
+'ht'#2#13#3'Top'#2'*'#5'Width'#3#151#1#7'Caption'#6'IYou should see a small '
|
||||
+'rectangle filled with gray and a diagonal red line'#5'Color'#7#6'clNone'#11
|
||||
+'ParentColor'#8#8'WordWrap'#9#0#0#0
|
||||
+'Caption'#6#5'Form1'#12'ClientHeight'#3#144#0#11'ClientWidth'#3'o'#2#8'OnCre'
|
||||
+'ate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#7'OnPaint'#7#9'FormPai'
|
||||
+'nt'#0#6'TLabel'#6'Label1'#4'Left'#3#156#0#6'Height'#2'+'#3'Top'#2'*'#5'Widt'
|
||||
+'h'#3'\'#1#7'Caption'#6'JYou should see a small rectangle filled with black '
|
||||
+'and a diagonal red line'#11'ParentColor'#8#8'WordWrap'#9#0#0#0
|
||||
]);
|
||||
|
||||
@ -118,7 +118,7 @@ var
|
||||
begin
|
||||
// fill line with gray
|
||||
for i:=0 to (ImgWidth*4)-1 do
|
||||
PByte(LineStart)[i]:=0; // set red, green and blue to 128 (i.e. gray)
|
||||
PByte(LineStart)[i]:=0; // set red, green and blue to 0 (i.e. black)
|
||||
// set one pixel to red (this creates a red line)
|
||||
PByte(LineStart)[(Row mod ImgWidth)*4+2]:=255;
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user