AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Fit image in control

Ein Thema von WojTec · begonnen am 31. Jan 2017 · letzter Beitrag vom 1. Feb 2017
 
Rollo62

Registriert seit: 15. Mär 2007
4.159 Beiträge
 
Delphi 12 Athens
 
#4

AW: Fit image in control

  Alt 1. Feb 2017, 11:35
Maybe this helps to make calculations easier, if this is what you are looking for.

FitInto and PlaceInto are nice functions already in the library, but not very popular.

Zitat:
class function Empty: TRectF; inline; static;
{ This method is to be deprecated. It stretches current rectangle into designated area similarly to FitInto,
but only when current rectangle is bigger than the area; otherwise, it only centers it. }
function Fit(const BoundsRect: TRectF): Single; // deprecated 'Please consider using FitInto instead.';
{ Stretches current rectangle into the designated area, preserving aspect ratio. Note that unlike Fit, when designated
area is bigger than current rectangle, the last one will be stretched to fill designated area (while Fit would only
center it). }
function FitInto(const ADesignatedArea: TRectF; out Ratio: Single): TRectF;
http://docwiki.embarcadero.com/Libra...m.Types.TRectF

Rollo
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:03 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz