Originally shared by David Berneda


Originally shared by David Berneda

#TeeChart World maps can now be rendered in 3D (VCL: GDI, GDI+, OpenGL and Firemonkey: all platforms). Very fast rotation and zoom

Comments

  1. Nice! besides soime location glitches, something probably has to be done for the readability of labels:
    - maybe a dark outer edge, so they can be read even on bright background (like Brazil, Mali, Sudan in your shot)
    - not constraining the width so much (tiny "United States of America" and others)

    ReplyDelete
  2. Very nice, but built in Delphi 7 ?!? At least it has a D7 icon

    ReplyDelete
  3. Attila Kovacs Thanks for noticing ! Fixed now ! Also fixed mouse-hover on hidden polygons (to not highlight them or raise mouse click events)

    ReplyDelete
  4. Eric Grange Yes ! labels need some fine-tuning. I already do a contrast-check to choose a "best" font color but its not done comparing HLS for speed reasons, so its currently quite fast and poor:

    if (Byte(AColor)<$80) or
    (Byte(AColor shr 8)<$80) or
    (Byte(AColor shr 16)<$80) then
    result:=clWhite
    else
    result:={$IFDEF FMX}claBlack{$ELSE}clBlack{$ENDIF};

    Works reasonably well with dark colors but not with bright solid colors.

    Thought also about outlining the font or drawing a back smooth blur shadow centered behind text. All these properties already exist in my Font class but the output is not always perfect depending on canvas (gdi, gdi+, opengl, firemonkey canvas etc) so its hard to choose something that will work fine in all situations. Maybe a new "Autoxxx" property to do it dynamically based on which canvas is currently active, and when Auto=False the font will respect user-choosen properties.

    >>re: tiny text size
    Yes, font size is calculated based on available space, there is a "MinSize" property to discard small texts, I choose 4 as min size, maybe its too small ! Depends also on font family, current Arial is not the best for small sizes.

    There are some other possibilities, like word-wrapping texts so then the auto font size can result bigger. Also the label position is based on the "center" of the polygon and sometimes is not the most appropiate location.

    ReplyDelete
  5. Marco Cantù hehe still supporting D7, but it runs also fine in Berlin (VCL and FMX) with zero IFDefs

    ReplyDelete
  6. David Berneda said "still supporting D7" - *THANK YOU SIR" - I am reminded that many years ago when coding graphics engines - our engineers coded using the least performing hardware the code was expected to run on. Most likly, that is why that engine went on to replace the one used by that company with the mouse ears (and we were rewarded appropriately). Good job David Berneda - know there are plenty dev using "Legacy Delphi". My largest customer still uses D6 for production even though we have every version installed and running.

    ReplyDelete

Post a Comment