Jump to content
uniGUI Discussion Forums

andyhill

uniGUI Subscriber
  • Content Count

    400
  • Joined

  • Last visited

  • Days Won

    1

andyhill last won the day on November 30 2017

andyhill had the most liked content!

Community Reputation

4 Neutral

About andyhill

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Melbourne Australia

Recent Profile Visitors

240 profile views
  1. How can I change the Scale (zoom) of a TUnimImage in code ? Please advise.
  2. andyhill

    TUnimImage Add Click Listener X/Y

    Yes, Thank You
  3. andyhill

    TUnimImage Add Click Listener X/Y

    Yes, real X,Y on Image canvas irrespective of zoom
  4. Please show how to add Mouse Click (tap) listener and retrieve X,Y Position on Canvas.
  5. I have a Mobile TMainmForm TUnimContainerPanel TUnimPanel TUnimHTMLFrame All perfectly displayed on iOS Device. I want to work with the HTMLFrame canvas which is declared in HTML as //HTMLFrame.HTML.Add(' <canvas id = "andy" width = "'+IntToStr(ContainerPanel.Width+43)+'" height = "'+IntToStr(ContainerPanel.Height+84)+'" style = "border: 1px solid #000000;">'); HTMLFrame.HTML.Add(' <canvas id = "andy" width = "'+IntToStr(Panel.Width+43)+'" height = "'+IntToStr(Panel.Height+84)+'" style = "border: 1px solid #000000;">'); //HTMLFrame.HTML.Add(' <canvas id = "andy" width = "100%" height = "100%" style = "border: 1px solid #000000;">'); //HTMLFrame.HTML.Add(' <canvas id = "andy" width = "'+IntToStr(UniApplication.ScreenWidth-2)+'" height = "'+IntToStr(UniApplication.ScreenHeight-2)+'" style = "border: 1px solid #000000;">'); Why can I not get correct width/height for canvas, my best fit was Panel.Width+43 and Panel.Height+84 which is unique to my iPhoneX and incorrect for any other mobile device. How can I get correct pixel dimensions to declare for my canvas ? Please advise - thanks in advance.
  6. andyhill

    How drawing a circle in TuniCanvas?

    The above reference is to Touch (as you know we are now 6.6.0) with other forum users saying it does not work. (They use a Desktop Canvas in a Mobile project which no longer compiles). As an interim, how can we use TUnimImage. Image: TUnimImage; // Contains Image URL (Parent is Panel) ... procedure TMainmForm.UnimFormReady(Sender: TObject); begin UniSession.AddJS('ajaxRequest(MainmForm.Panel, "_Draw", []);'); end; procedure TMainmForm.PanelAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_Draw' then begin Image.Picture.Bitmap.Canvas.Lock; Image.Picture.Bitmap.Canvas.Pen.Width:= 4; Image.Picture.Bitmap.Canvas.Pen.Color:= clBlack; Image.Picture.Bitmap.Canvas.MoveTo(10, 10); Image.Picture.Bitmap.Canvas.LineTo(20, 20); Image.Picture.Bitmap.Canvas.UnLock; end; end; Running on Desktop line fails to show ? Running on Mobile project times out, does not run.
  7. andyhill

    How drawing a circle in TuniCanvas?

    How can we draw on any mobile object canvas ? Please give me something to work with.
  8. andyhill

    How drawing a circle in TuniCanvas?

    Sherzod, Where is the TUnimCanvas ???
  9. andyhill

    Google Authenticator

    Trying to test. My Google Account OAuth-2.0-Client-ID does not show ReDirect Option ? Please advise - thanks Authorized domains To protect you and your users, Google only allows applications that authenticate using OAuth to use Authorized Domains. Your applications' links must be hosted on Authorized Domains. Learn more Application Homepage link Shown on the consent screen. Must be hosted on an Authorized Domain. Application Privacy Policy link Shown on the consent screen. Must be hosted on an Authorized Domain. Application Terms of Service link (Optional) Shown on the consent screen. Must be hosted on an Authorized Domain. Save Submit for verification Cancel
  10. andyhill

    How drawing a circle in TuniCanvas?

    Ellipse and Text. I think off memory you have shown canvas text out in another post. This must all work on Mobile.
  11. andyhill

    How drawing a circle in TuniCanvas?

    Polygon
  12. andyhill

    How drawing a circle in TuniCanvas?

    Arc
  13. andyhill

    How drawing a circle in TuniCanvas?

    Thank you, I look forward to the answers
  14. andyhill

    How drawing a circle in TuniCanvas?

    Sherzod, We need canvas drawing in both Desktop and Mobile. Line, Rectangle (flood fill) and Circle (flood fill) appear to be there. We need polygon (flood fill), Ellipse (flood fill) and Arc. Polyline via a work around is possible but a true PolyLine function would be better. Never got to test Text but that goes without saying. We need SaveToFile and SaveToStream to work. Scaling too.
  15. andyhill

    How drawing a circle in TuniCanvas?

    Why would you say such a thing when CanvasDemo does not contain :- Arc PolyLine PolyGon Plus UniCanvas1.BitmapCanvas.Ellipse does not exist in 6.6.0 as far as I can tell ? Also UniCanvas1.SaveToFile('files\temp.jpg', tiJPG); does not save a valid image ?
×