You have been subscribed to a public bug:

I have written a custom draw GUI toolkit called fpGUI Toolkit
[http://opensoft.homeip.net/fpgui/] and noticed since I started using
Ubuntu 9.04 and Kubuntu 9.04 that my widgets have missing pixels in the
bottom left corners. I previously used Ubuntu 7.10 where this was not
the case. fpGUI uses XLib drawing routines directly, it DOESN'T used
other toolkits like GTK, QT, Cairo etc... fpGUI Toolkit is written in
Object Pascal language.

I have also noticed the same issue in other applications not based on
fpGUI Toolkit. For example, I ran Beyond Compare v2 under Wine and it
displayed the same problems. The Bottom left corners of Menus, Buttons,
ComboBoxes etc are all missing pixels.

I did some testing and the XLib XDrawRectangle() method seems to work,
but using the XLib XDrawLine() method doesn't in the latest Ubuntu 9.04.
Like I said, in Ubuntu 7.10 and Ubuntu 8.04 this worked perfectly.


Button face drawing code used in fpGUI Toolkit
====================
procedure TfpgStyle.DrawButtonFace(ACanvas: TfpgCanvas; x, y, w, h: TfpgCoord; 
AFlags: TFButtonFlags);
var
  r: TfpgRect;
begin
  r.SetRect(x, y, w, h);

  if btfIsDefault in AFlags then
  begin
    ACanvas.SetColor(clBlack);
    ACanvas.SetLineStyle(1, lsSolid);
    ACanvas.DrawRectangle(r);
    InflateRect(r, -1, -1);
    Exclude(AFlags, btfIsDefault);
    fpgStyle.DrawButtonFace(ACanvas, r.Left, r.Top, r.Width, r.Height, AFlags);
    Exit; //==>
  end;

  ACanvas.SetColor(clButtonFace);
  ACanvas.SetLineStyle(1, lsSolid);
  ACanvas.FillRectangle(x, y, w, h);

  if (btfFlat in AFlags) and not (btfIsPressed in AFlags) then
    Exit; // no need to go further

  // Left and Top (outer)
  if (btfIsPressed in AFlags) then
  begin
    if (btfIsEmbedded in AFlags) then
      ACanvas.SetColor(clHilite2)
    else
      ACanvas.SetColor(clShadow2);
  end
  else
    ACanvas.SetColor(clHilite2);

  ACanvas.DrawLine(r.Left, r.Bottom, r.Left, r.Top);  // left
  ACanvas.DrawLine(r.Left, r.Top, r.Right, r.Top);    // top

  // Right and Bottom (outer)
  if (btfIsPressed in AFlags) then
  begin
    if (btfIsEmbedded in AFlags) then
      ACanvas.SetColor(clHilite1)
    else
      ACanvas.SetColor(clShadow2);
  end
  else
    ACanvas.SetColor(clShadow2);
    
  ACanvas.DrawLine(r.Right, r.Top, r.Right, r.Bottom);   // right
  ACanvas.DrawLine(r.Right, r.Bottom, r.Left-1, r.Bottom);   // bottom

  // Right and Bottom (inner)
  if btfIsPressed in AFlags then
  begin
    if (btfIsEmbedded in AFlags) then
      ACanvas.SetColor(clButtonFace)
    else
      ACanvas.SetColor(clHilite1);
  end
  else
    ACanvas.SetColor(clShadow1);

  ACanvas.DrawLine(r.Right-1, r.Top+1, r.Right-1, r.Bottom-1);   // right
  ACanvas.DrawLine(r.Right-1, r.Bottom-1, r.Left, r.Bottom-1);   // bottom
end;
====================

...and ACanvas.DrawLine calls the following XLib method as follows...

==========================
procedure TfpgCanvasImpl.DoDrawLine(x1, y1, x2, y2: TfpgCoord);
begin
  // Same behavior as Windows. See documentation for reason.
  XDrawLine(xapplication.display, FDrawHandle, Fgc, x1, y1, x2, y2);
end;
===========================

attached screenshot clearly shows the missing pixels. I used 'xmag' to
enlarge the areas.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: libx11-6 2:1.1.99.2-1ubuntu2
ProcEnviron:
 LC_TIME=en_DK.UTF-8
 PATH=(custom, user)
 LANG=en_ZA.UTF-8
 SHELL=/bin/bash
ProcVersion: Linux version 2.6.28-11-generic (buildd@palmer) (gcc version 4.3.3 
(Ubuntu 4.3.3-5ubuntu4) ) #37-Ubuntu SMP Mon Mar 23 16:40:23 UTC 2009
SourcePackage: libx11
Uname: Linux 2.6.28-11-generic i686

[lspci]
00:00.0 Host bridge [0600]: ATI Technologies Inc Radeon 9100 IGP Host Bridge 
[1002:7833]
        Subsystem: ATI Technologies Inc Radeon 9100 IGP Host Bridge [1002:7833]
01:05.0 VGA compatible controller [0300]: ATI Technologies Inc Radeon 9100 PRO 
IGP [1002:7834]
        Subsystem: Giga-byte Technology Device [1458:5000]

** Affects: xserver-xorg-video-ati (Ubuntu)
     Importance: Undecided
         Status: Incomplete


** Tags: apport-bug i386 jaunty kubuntu lucid natty
-- 
missing pixels when drawing connecting lines
https://bugs.launchpad.net/bugs/353137
You received this bug notification because you are a member of Desktop 
Packages, which is subscribed to xserver-xorg-video-ati in Ubuntu.

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to