View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0019384LazarusWidgetsetpublic2011-05-20 03:082012-04-20 15:46
Reportergitspielen 
Assigned ToZeljan Rikalo 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product VersionProduct Build 
Target VersionFixed in Version 
Summary0019384: TCanvas.Brush.Color problem on GTK2
DescriptionHi guys.

I already discussed this problem with Bart on the forum:
http://lazarus.freepascal.org/index.php/topic,13167.msg68590.html#msg68590 [^]

And we made a conclusion there seems to be without any problem with TMaskEdit component itself.

I guess there must be an issue with root permission:
http://lazarus.freepascal.org/index.php/topic,13167.msg68649.html#msg68649 [^]

In addition, no one gives me any suggestion with TCanvas.Brush problem yet :(

Thanks.
Additional InformationUbuntu 11.04 with Unity and GTK2 2.24.0
Korean Language pack installed.
Tested under FPC 2.4.2 + Lazarus 0.9.30 from Synaptic and trunk version via SVN.
TagsNo tags attached.
Fixed in Revision36929
LazTarget1.0
Widgetset
Attached Files

- Relationships
related to 0019413closedBart Broersma TEdit.KeyPress does not fire anymore after the first keypress (Ubuntu 11.04 GTK2) 
related to 0021863closedZeljan Rikalo Cannot set background color for drawing text 

-  Notes
(0048582)
gitspielen (reporter)
2011-05-25 17:04

The first issue is duplicated by this: http://bugs.freepascal.org/view.php?id=19413 [^]

But still the second one remained.
(0050635)
Flávio Etrusco (mantis doesn't notify me) (developer)
2011-08-09 13:04

You reported the bug in the wrong project (Mantis support)...
(0058716)
Bart Broersma (developer)
2012-04-18 15:10
edited on: 2012-04-18 22:14

Quoted gitspielen from the forum:


=============================================
[quote]
secondly i wrote some texts on timage.canvas setting its brush.color for their background colors like this:

Code:
with Image1.Canvas do
begin
  Font.Color:=clRed;
  Brush.Color:=clYellow;
  Brush.Style:=bsSolid;
  TextOut(5, 5, 'blah blah');
end;

red texts on yellow displayed on windows box as i expected but only the text color changed on linux. what's wrong with that?

[/quote]
=============================================

I have adjusted the topic title to reflect the problem.

(0058723)
Zeljan Rikalo (developer)
2012-04-18 20:47

Bart, please attach complete example.
(0058728)
Bart Broersma (developer)
2012-04-18 22:13

@Zeljan: You should ask gitspielen.
I merely tried to clarify what this bugreport is about (the actual description was rather vague), citing his posting on the forum.
(0058788)
Bart Broersma (developer)
2012-04-20 12:18

@gitspielen: please provide a sample program (sources only) demonstrating the issue.
(0058793)
Zeljan Rikalo (developer)
2012-04-20 14:51

hm...qt works fine, but indeed gtk2 does not change brush bg in this case.
(0058794)
Zeljan Rikalo (developer)
2012-04-20 14:51

I confirm that this is bug on gtk2.
(0058795)
Zeljan Rikalo (developer)
2012-04-20 14:56

This is *workaround* atm (only for gtk2):
with Image1.Canvas do
begin
  Font.Color:=clRed;
  Brush.Color:=clYellow;
  // Brush.Style:=bsSolid; NOT NEEDED FOR TRUNK, bsSolid is already setted up
  // when Color is changed
  FillRect(3, 3, TextWidth('blah blah') + 2,TextHeight('blah') + 2);
  TextOut(5, 5, 'blah blah');
end;
(0058799)
Zeljan Rikalo (developer)
2012-04-20 15:43

actually gtk2 does not respect brush state + color when drawing text.
(0058800)
Zeljan Rikalo (developer)
2012-04-20 15:46

Please test and close if ok.

- Issue History
Date Modified Username Field Change
2011-05-20 03:08 gitspielen New Issue
2011-05-25 17:04 gitspielen Note Added: 0048582
2011-08-09 13:04 Flávio Etrusco (mantis doesn't notify me) Note Added: 0050635
2012-04-16 13:16 Vincent Snijders Relationship added related to 0019413
2012-04-16 13:16 Vincent Snijders Project Mantis => Lazarus
2012-04-18 15:10 Bart Broersma LazTarget => -
2012-04-18 15:10 Bart Broersma Note Added: 0058716
2012-04-18 15:10 Bart Broersma Category => Widgetset
2012-04-18 15:10 Bart Broersma Summary TMaskEdit and TCanvas.Brush => TCanvas.Brush.Color problem on GTK2
2012-04-18 15:10 Bart Broersma Note Edited: 0058716
2012-04-18 15:11 Bart Broersma Note Edited: 0058716
2012-04-18 20:47 Zeljan Rikalo Note Added: 0058723
2012-04-18 22:13 Bart Broersma Note Added: 0058728
2012-04-18 22:14 Bart Broersma Note Edited: 0058716
2012-04-20 12:18 Bart Broersma Note Added: 0058788
2012-04-20 12:18 Bart Broersma Status new => feedback
2012-04-20 14:51 Zeljan Rikalo Note Added: 0058793
2012-04-20 14:51 Zeljan Rikalo Note Added: 0058794
2012-04-20 14:51 Zeljan Rikalo Status feedback => confirmed
2012-04-20 14:56 Zeljan Rikalo Note Added: 0058795
2012-04-20 15:27 Zeljan Rikalo Status confirmed => assigned
2012-04-20 15:27 Zeljan Rikalo Assigned To => Zeljan Rikalo
2012-04-20 15:43 Zeljan Rikalo Note Added: 0058799
2012-04-20 15:46 Zeljan Rikalo Fixed in Revision => 36929
2012-04-20 15:46 Zeljan Rikalo LazTarget - => 1.0
2012-04-20 15:46 Zeljan Rikalo Status assigned => resolved
2012-04-20 15:46 Zeljan Rikalo Resolution open => fixed
2012-04-20 15:46 Zeljan Rikalo Note Added: 0058800
2012-04-26 08:48 Zeljan Rikalo Relationship added related to 0021863



MantisBT 1.2.12[^]
Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker