Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-08

Changes to Frame3D in Lazarus 0.9.31

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Frank Church

I am installing a component that works okay in 0.9.31 and the definition of the Frame3D function in extctrls.pp has changed.

The definition in 0.9.30 is not in extctrls.pp. Where is it defined in previous versions?

The component uses

 Frame3D( Self.Canvas.Handle, R, FFrameWidth, bvRaised );

and the definition in 0931 is below.

// Wrapper function for TCanvas.Frame3D.
Show quoted text 6 lines
procedure Frame3D(ACanvas: TCanvas; var ARect: TRect; TopColor, BottomColor: TColor; const FrameWidth: integer); begin ACanvas.Frame3D(ARect, TopColor, BottomColor, FrameWidth); end;

Top and bottom colour are included and FrameWidth is ignored.

Is there some other wrapper to make the old code compatible with this one, or does it have to forego the style property altogether, and fill in something for the colors?

PS.

Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110805/dd2d5f98/attachment.html>

Reply by email

Juha Manninen
to Frank Church

2011/8/5 Frank Church

Show quoted text 10 lines
// Wrapper function for TCanvas.Frame3D. > procedure Frame3D(ACanvas: TCanvas; var ARect: TRect; > TopColor, BottomColor: TColor; const FrameWidth: integer); > begin > ACanvas.Frame3D(ARect, TopColor, BottomColor, FrameWidth); > end; >

Hi
I added that version of Frame3D to LCL trunk.
There is another version of Frame3D with very different parameter signature. It existed already earlier.

Show quoted text 6 lines
Top and bottom colour are included and FrameWidth is ignored. Is there some other wrapper to make the old code compatible with this one, or does it have to forego the style property altogether, and fill in something for the colors?

Do you mean Delphi has other versions of Frame3D with different parameters? Could you implement them and create a patch?

Regards,
Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110805/bc4a4804/attachment.html>

Reply by email

Frank Church
to Frank Church: I am installing a component that works okay in 0.9.31 and the definition of the Frame3D…
Frank Church wrote 30 lines
I am installing a component that works okay in 0.9.31 and the definition of the Frame3D function in extctrls.pp has changed. The definition in 0.9.30 is not in extctrls.pp. Where is it defined in previous versions? The component uses Frame3D( Self.Canvas.Handle, R, FFrameWidth, bvRaised ); > and the definition in 0931 is below. // Wrapper function for TCanvas.Frame3D. > procedure Frame3D(ACanvas: TCanvas; var ARect: TRect; > TopColor, BottomColor: TColor; const FrameWidth: integer); > begin > ACanvas.Frame3D(ARect, TopColor, BottomColor, FrameWidth); > end; > Top and bottom colour are included and FrameWidth is ignored. Is there some other wrapper to make the old code compatible with this one, or does it have to forego the style property altogether, and fill in something for the colors?

In Graphics.pp there are 2 definitions of Frame3d and the one in extcrtls.pp matches the second one.

I am not that familiar with the LCL internals and it is something I'd rather not fiddle with

Can't the first one also be declared and implemented in a similar style?

    procedure Frame3d(var ARect: TRect; const FrameWidth: integer;
Show quoted text 13 lines
const Style: TGraphicsBevelCut); virtual; procedure Frame3D(var ARect: TRect; TopColor, BottomColor: TColor; const FrameWidth: integer); overload; PS. -- Frank Church ======================= http://devblog.brahmancreations.com
Frank Church ======================= http://devblog.brahmancreations.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110805/09b1cfd0/attachment.html>

Reply by email