{"id":288,"date":"2022-03-01T22:40:07","date_gmt":"2022-03-01T21:40:07","guid":{"rendered":"http:\/\/graphics32\/?page_id=288"},"modified":"2022-03-01T22:45:21","modified_gmt":"2022-03-01T21:45:21","slug":"using-timage32","status":"publish","type":"page","link":"https:\/\/melander.dk\/graphics32\/using-timage32\/","title":{"rendered":"Using TImage32"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This section describes behavior and properties of <a href=\"https:\/\/graphics32.github.io\/Docs\/Units\/GR32_Image\/Classes\/TCustomImage32\/_Body.htm\">TCustomImage32<\/a> and <a href=\"https:\/\/graphics32.github.io\/Docs\/Units\/GR32_Image\/Classes\/TImage32\/_Body.htm\">TImage32<\/a> controls, as well as their realization of layers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since <a href=\"https:\/\/graphics32.github.io\/Docs\/Units\/GR32_Image\/Classes\/TCustomImage32\/_Body.htm\">TCustomImage32<\/a> and <a href=\"https:\/\/graphics32.github.io\/Docs\/Units\/GR32_Image\/Classes\/TImage32\/_Body.htm\">TImage32<\/a> share the same behavior, I will denote both of them here as TImage32. Most of the description applies to the TImgView32 control as well.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a>Overview<\/a><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">TImage32 is an image displaying visual component, which also holds a collection of layers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The internal image of the control is a TBitmap32 object. The scale and position of the image within the control&#8217;s boundaries can be controlled with several properties. See <a href=\"https:\/\/melander.dk\/graphics32\/using-timage32\/bitmap-image\/\" data-type=\"page\" data-id=\"283\">Bitmap Image<\/a> for details.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A layers is, generally speaking, an entities which &#8216;knows&#8217; how to combine itself with the back buffer of the control. TImage32 maintains a collection of layers. See &#8216;<a href=\"https:\/\/graphics32.github.io\/Docs\/Additional%20Topics\/Using%20TImage32\/Using%20Layers.htm\">Using Layers<\/a>&#8216; for details.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the image paints itself, it runs through several <a href=\"https:\/\/graphics32.github.io\/Docs\/Additional%20Topics\/Using%20TImage32\/Paint%20Stages.htm\">Paint Stages<\/a> which determine the order in which layers and the bitmap image are painted. This order is completely customizeable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To avoid flicker and to speed-up scaling and blending operations, each layer and the bitmap image is painted to a back-buffer of the control. See the reference of TImage32 ancestor <a href=\"https:\/\/graphics32.github.io\/Docs\/Units\/GR32_Image\/Classes\/TCustomPaintBox32\/_Body.htm\">TCustomPaintBox32<\/a> for details of the back-buffer realization.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, TImage32 supports change notification via the <a href=\"https:\/\/graphics32.github.io\/Docs\/Units\/GR32_Image\/Classes\/TCustomImage32\/Events\/OnChange.htm\">OnChange<\/a> event, which is done similar to change notification in <a href=\"https:\/\/graphics32.github.io\/Docs\/Units\/GR32\/Classes\/TBitmap32\/_Body.htm\">TBitmap32<\/a>. Basically, it redirects change notification from its layers and the bitmap image.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This section describes behavior and properties of TCustomImage32 and TImage32 controls, as well as their realization of layers. Since TCustomImage32 and TImage32 share the same behavior, I will denote both of them here as TImage32. Most of the description applies<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-288","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/melander.dk\/graphics32\/wp-json\/wp\/v2\/pages\/288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/melander.dk\/graphics32\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/melander.dk\/graphics32\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/melander.dk\/graphics32\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/melander.dk\/graphics32\/wp-json\/wp\/v2\/comments?post=288"}],"version-history":[{"count":2,"href":"https:\/\/melander.dk\/graphics32\/wp-json\/wp\/v2\/pages\/288\/revisions"}],"predecessor-version":[{"id":293,"href":"https:\/\/melander.dk\/graphics32\/wp-json\/wp\/v2\/pages\/288\/revisions\/293"}],"wp:attachment":[{"href":"https:\/\/melander.dk\/graphics32\/wp-json\/wp\/v2\/media?parent=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}