Find Jobs
Hire Freelancers

A TPanel component that displays a PNG glyph from TImageCollection

$30-250 USD

Completed
Posted over 3 years ago

$30-250 USD

Paid on delivery
Write in Delphi 10.4 or compatible a TCustomPanel descendant that supports drawing of a PNG glyph inside the panel, with the glyph aligned left within the panel. The control shall have these custom properties: ImageCollection : TImageCollection; - Defines the source from which the panel reads the PNG glyph GlyphName : String; - Defines the name of the image inside TImageCollection that the control draws to its canvas. GlyphLeftMargin : Integer; - Defines the distance between the left edge of the control and the PNG glyph drawn. For example, if GlyphLeftMargin = 5, there will be empty space of 5 units between the left edge of the control and the left edge of the PNG glyph. GlyphTopPadding : Integer; - Defines a minimum space required to be empty between the top of the PNG Glyph and the edge of the control. GlyphResizing : Boolean; - Defines whether the glyph can be resized. Note: If set to true, the resizing shall not ever change the ratio of height and width of the glyph. The PNG Glyph shall be drawn to the left side of the control, vertically centered. The control must automatically choose the best size image from the TImageCollection of the matching GlyphName. For example, should the linked TImageCollection contain picture named "tool_icon" in sizes of 32x32, 48x48, 64x64 and 128x128 pixels, and the size of the control is 100x100, GlyphLeftMargin = 10 and GlyphTopPadding = 5, GlyphResizing = false, the PNG Glyph from TImageCollection named "tool_icon" of size 64x64 will be drawn at position of left 10 pixels and vertically centered. The glyph is not resized, but drawn as it is, in the best matching (largest possible) size, i.e. 64x64. If in the above case, the GlyphResizing = true and GlyphLeftMargin = 0, then "tool_icon" size 128x128 is selected and resized to be 100x100, filling the entire canvas of the panel. If in the above case, the GlyphResizing = true and GlyphLeftMargin = 10, then "tool_icon" size 128x128 is selected and resized to be 90x90, and drawn to the canvas vertically centered, 10 units from the left edge of the control. If in the above case, the GlyphResizing = true and GlyphTopPadding = 5, then "tool_icon" size 128x128 is selected and resized to be 95x95, and drawn to the canvas vertically centered, 0 units from the left edge of the control.
Project ID: 28293503

About the project

1 proposal
Remote project
Active 3 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
$0 USD in 2 days
4.9 (113 reviews)
5.7
5.7

About the client

Flag of THAILAND
Chiang Mai, Thailand
5.0
664
Payment method verified
Member since Mar 16, 2011

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.