Jump to content

Czar

Members
  • Content count

    380
  • Joined

  • Last visited

  • Days Won

    5

Czar last won the day on September 14

Czar had the most liked content!

1 Follower

About Czar

  • Rank

Contact Methods

  • Website URL
    numberworks.com

Profile Information

  • Location
    Auckland

Smart Mobile Studio

  • Edition
    Professional

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Czar

    Size of Components at Runtime

    That would be a useful solution
  2. Czar

    Size of Components at Runtime

    Wouldn't that boil down to css? I open sms drop down a tw3button at 128x32. If I leave the border then seems a bit bigger - if I remove border then 128x32
  3. Czar

    ShowModal and Measuring Text

    I assume you have checked the obvious, that FMessageText is not blank? What happens if you fudge a size, does work correctly otherwise?
  4. Czar

    inheritance

    I managed to a solution which is probably better var Context := JCanvasRenderingContext2D(LBitmap.canvas.context.handle.getContext('2d')); Context.font:="75px verdana"; Context.shadowColor:="black"; Context.shadowBlur:=7; Context.lineWidth:=5; Context.strokeText("TEstMe",25,100); Context.shadowBlur:=0; Context.fillStyle:="white"; Context.fillText("TEstMe",25,100);
  5. Czar

    inheritance

    I have been working on rendering fonts onto the canvas. After getting a few pointers I managed to get what I am after. However, I have been hacking direct into the smartcl.legacy procedure TCanvas.TextOut(dx,dy: integer;aText: string;aColor:TColor); var mTemp: Variant; begin mTemp:=FDC.fillStyle; FDC.fillStyle:=ColorToWebStr(aColor); FDC.lineWidth:=4; FDC.shadowBlur := 7; FDC.shadowColor := 'black'; FDC.strokeText(aText,dx,dy); FDC.shadowBlur:=0; FDC.fillStyle:="white"; FDC.FillText(aText,dx,dy); FDC.fillStyle:=mTemp; I thought i could simply inherit type TMyCanvas = class(Tcanvas) procedure MyTextOut(dx,dy: integer;aText: string;aColor:TColor); end; procedure TMyCanvas.MyTextOut(dx,dy: integer;aText: string;aColor:TColor); var mTemp: Variant; begin FDC.lineWidth:=4; FDC.shadowBlur := 7; FDC.shadowColor := 'black'; FDC.strokeText(aText,dx,dy); FDC.shadowBlur:=0; FDC.fillStyle:="white"; FDC.FillText(aText,dx,dy); FDC.fillStyle:=mTemp; end; However, I get an error FDC not visible in this scope. What basic 101 am I violating? Syntax Error: Member symbol "FDC" is not visible from this scope [line: 54, column: 10, file: Form1]
  6. Czar

    tw3slider mouseup

    if you have a tw3slider and you add a mouseup event then it breaks the component. Once you have clicked on it you cannot stop it reacting to the mouse.
  7. Czar

    canvas font rendering

    The bit that I don't follow is how do I go from say this function drawStroked(text, x, y) { ctx.font = "80px Sans-serif" ctx.strokeStyle = 'black'; ctx.lineWidth = 8; ctx.strokeText(text, x, y); ctx.fillStyle = 'white'; ctx.fillText(text, x, y); } drawStroked("37°", 50, 150); to this LBitmap.Canvas.Context.DC.font := 'bold 24px verdana '; where can I find out what "'bold 24px verdana '; " can be replaced with?
  8. Czar

    Translucent Panel Blur Effect

    Would the ImageFilters demo get you there? The stack blur could be used with opacity etc
  9. Czar

    canvas font rendering

    Hi I am trying to understand what my options are when I textout to canvas. LBitmap.Canvas.Context.DC.font := 'bold 24px verdana '; When I google I get lots of results for CSS but that is presumably not quite the same as above. I am looking to understand what this type of definition is referred to. Why because I would like to render with a text-shadow or blur or some other nice effect. I am struggling with some basic gaps in understanding. Is this referred to context.font? https://www.w3schools.com/Tags/canvas_font.asp
  10. Czar

    smartcl.effects

    Suggestion - the fxmove etc are very good - easy to use. However, there doesn't appear to be a simple rotation effect. You can go the whole rotation system using TW3RotateCSSAnimation however, if you simply want to adjust the angle a bit, like a rocking boat of swaying palm trees then you appear to have to make your own. procedure TForm1.RockBoat; begin visual.boatangle := visual.boatangle +0.2; visual.boatimg.Angle := sin(visual.boatangle); TW3Dispatch.Execute( procedure begin RockBoat end, 75); end;
  11. Czar

    Background uploading files

    Cheers Nico, the client app is as simple as I could make it. The creation app (not linked) has a bit more going for it. It is a bit rough but it is easy for my colleague to create new items with a minimum of fuss for franchisees to then customise and use for their social media requirements. It will save us many hours of work not having to customise on demand in Illustrator. I am in no way a fan of Edge - it is just that my years of educating our franchisees in using a real browser haven't paid 100% dividends. I will check out the links. I have insufficient understanding of javascript and find interfacing with SMS mostly hocus pocus. I will see how I get on tomorrow - as for now I am back to painting architraves and window sills
  12. Czar

    Background uploading files

    This app is now almost done https://numberworksnwords.com/adtoolkit/index.html However, it won't download the resulting image in MS Edge writeln('About to create image for downloading'); TW3URLObject.Download( LEncodedData, textbox[0].imagefilename); // only works in a external browser writeln('encoded '+LEncodedData); The LENcodedData is there but no image is created when TW3URLObject.Download is called. Works no probs with Chrome and Firefox Any ideas why edge is different and if there is possible to work around? I have attached simple example testedge.rar
  13. Czar

    add preexisting pas/form

    The source is all external - I was simply trying to add a unit/form to my project - easy to add a unit but the form won't open. I did a work around - create new unit of same name - save and then copy the .pas and .smf over the newly created code
  14. Czar

    add preexisting pas/form

    It is easy to add a unit to an existing item. However, I cannot see how I can take a unit and form from one project and then add it to another. If you add the pas file the form is not available. How can this be done?
  15. Czar

    a basic JSON question

    Thanks @jarto and @lynkfs some very useful replies.
×