Google Groups Home
Help | Sign in
Many manual conversions now exposed for direct use
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
John Bridges  
View profile
 More options Feb 24, 7:38 pm
From: "John Bridges" <john.brid...@gmail.com>
Date: Sun, 24 Feb 2008 16:38:22 -0800
Local: Sun, Feb 24 2008 7:38 pm
Subject: Many manual conversions now exposed for direct use
New build of AfterGRASP is up for download:

http://www.aftergrasp.com/download/agsetup_20080224.exe

--------------------------------------------------------------------------- -
Sun, 24 February 2008

New functions to directly force conversions:

  FLOATRESULT = FLOAT(VALUE)
  FLOATRESULT = FLOATCOORDINATEX(XVALUE)
  FLOATRESULT = FLOATCOORDINATEX2(X1VALUE, X2VALUE)
  FLOATRESULT = FLOATCOORDINATEY(YVALUE)
  FLOATRESULT = FLOATCOORDINATEY2(Y1VALUE, Y2VALUE)
  FLOATRESULT = FLOATNUMBERX(XVALUE)
  FLOATRESULT = FLOATNUMBERY(YVALUE)
  INTRESULT = INTCOORDINATEX(XVALUE)
  INTRESULT = INTCOORDINATEX2(X1VALUE, X2VALUE)
  INTRESULT = INTCOORDINATEY(YVALUE)
  INTRESULT = INTCOORDINATEY2(Y1VALUE, Y2VALUE)
  INTRESULT = INTNUMBERX(XVALUE)
  INTRESULT = INTNUMBERY(YVALUE)

FLOAT(v) is the simplist, it's basically the same as adding 0.0 to
force a value to be floating point.

The COORDINATEX and COORDINATEY functions convert a value to
integer/float number with understanding of measurements and
left/right/top/bottom/center values.

The COORDINATEX2 and COORDINATEY2 functions handle size
measurements like:

        x2 = intcoordinatex2(50,(10pct)sizex)

NUMBERX and NUMBERY are for values that are not coordinates,
generally sizes of things like the height of a font, or
thickness of a box.

Normally these conversions are done by AfterGRASP internally
and you wouldn't need any of these functions (except FLOAT()
which is generally useful). But in a few special cases
I've found them needed.

I also did a internal code cleanup to remove direct references to
GetXCoordinate2 and GetYCoordinate2.

A handy example of how to read a Excel XML spreadsheet:

        drawclear white
        windowsize 1280 720
        set texthtml on
        text "<html>"
        xmlload sortres.xml test
        for j inarray array(arrayindex(test["Worksheet"]["Table"]["Row"]))
                for n inarray
array(arrayindex(test["Worksheet"]["Table"]["Row"][@j]["Cell"]))
                        text
@test["Worksheet"]["Table"]["Row"][@j]["Cell"][@n]["Data"]
                        text ","
                next
                textln
        next
        set variables on
        wait
        exitnow

WHEN INSIDE and WHEN OUTSIDE now handle SIZE measurements (for X2 and Y2).

--------------------------------------------------------------------------- -


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google