1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Donation with Paypal!!!

    Go to your paypal account and send directly donation to [email protected]

    1 month - 10 $ - Standart VIP

    6 months - 20 $- Standart VIP

    1 year - 30 $- Standart VIP

    2 years - 50 $- Standart VIP

    Gold member for life - 150 $- Standart VIP

    High Vip (Standart VIP include) group please send PM or email to [email protected] for info

    After Donation please send email to [email protected]

  3. Donation Ways 2020


    Paysend
  4. Telegram

  5. Delphifan Magazine
Dismiss Notice

Donation with Paypal!!!

Go to your paypal account and send directly donation to [email protected]

1 month - 10 $ - Standart VIP

6 months - 20 $- Standart VIP

1 year - 30 $- Standart VIP

2 years - 50 $- Standart VIP

Gold member for life - 150 $- Standart VIP

High Vip (Standart VIP include) group please send PM or email to [email protected] for info

After Donation please send email to [email protected]

Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

Native Paint API Demo App With Delphi XE5

Discussion in 'Delphi Android And IOS' started by AdminDF, Mar 17, 2014.

  1. AdminDF
    Online

    AdminDFAdminDF is a Verified Member Delphifan Staff Member DF Staff

    [​IMG]

    If you’re looking to use native components on IOS to build your apps one solution is the DPF IOS suite. The components in the suite actually wrap the native IOS controls just like the Delphi VCL wraps the native Windows controls. One benefit to using the native controls is that they are really fast and one drawback is that you can’t mix visual Delphi XE5 Firemonkey controls and DPF controls on the same form. In any event the DPF IOS controls come with a demo called Painter and it demonstrates how to use the DPF IOS controls to create an app like Painter that does native drawing. Painter only has one draw function which is to draw rectangles and it has a slider at the bottom which controls line with. However, you should be able to add other drawing types pretty easily once you take a look at the draw rectangle source code. DPF IOS is a pretty mature framework and has been in development since May of 2013. Here is the sample draw rect function from the demo:

    Code:
    procedure TFDrawingNative.DPFUIView1DrawRect( Sender: TObject; Rect: DPFNSRect );
    var
    context: CGContextRef;
    begin
    // [self.backgroundColor set];
    // UIRectFill(rect);
    
    context := UIGraphicsGetCurrentContext( );
    
    CGContextAddPath( context, path );
    CGContextSetLineCap( context, kCGLineCapRound );
    CGContextSetLineWidth( context, self.lineWidth );
    CGContextSetStrokeColorWithColor( context, self.lineColor.CGColor );
    
    CGContextStrokePath( context );
    
    isEmpty := False;
    end;

    Components from this site
     
  2. jeongsoo2k
    Online

    jeongsoo2k Guest

Share This Page