April 28, 2024, 03:57:07 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Info Only Update - 07-20-2013

Started by LarryMc, July 20, 2013, 11:02:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

Took a little break from the help file and added a new cell type

We now have @IWGIMAGE

The User will be able to add a bmp, jpg, or gif to a cell
bitmaps are non-scalable so if the user wants to see all the bitmap the row heights(all rows) and cell column width will have to be set to >= the bitmap size.

jpgs and gifs are scalable. They will have their h and w adjusted to match the current cell size.
A style flag,@IWG_NOSCALE, will override the scaling so that parts of the image greater than the cell size will be truncated, just like bitmaps.
Another style flag,@IWG_RATIO, will maintain the h/w ratio when scaling so that all of scale image fits inside cell.

The screenshot shows a bitmap in cell 1,1 and a jpg(scaled & no ratio) in cell 3,1.
I've got to add code to determine img raw dimensions.
I need that to calculate the h/w ratio for jpgs/gifs.
Once I have that I will be able to center a bitmap if it is smaller than the cell or
if jpg/gif and one of the dimensions is smaller than the cell when maintaining the h/w ratio I will be able to center it.


LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

bitmaps will be treated just like jpgs and gifs

with no scaling flag set
   images larger than the cell will be adjusted to fill the cell in that direction
   if the image is smaller than the cell it will be centered in that direction
   ratio flag has no impact

with scaling (default)
   images will be stretched/compressed in both directions to fill the cell
and ratio
   one dimension will be made the same size as the cell and the image will be centered in the other direction
      while maintaining the aspect ratio of the image
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library