rectangle with rounded edges?

12 posts, 0 answers
  1. John
    John avatar
    15 posts
    Member since:
    Aug 2015

    Posted 06 Oct 2015 Link to this post

     

    I'd like to use the Kendo UI drawing API (instead of the SnapSVG we were using). It seems limited though. I need a rectangle with a rounded edge. I see documentation on how to do a regular rectangle, but how do I do a rounded edge?

     

    John

     

  2. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 08 Oct 2015 Link to this post

    Hello John,

    Rounded edges are not currently supported out of the box but can be implemented by drawing a path(live demo).

    Regards,
    Daniel
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. John
    John avatar
    15 posts
    Member since:
    Aug 2015

    Posted 08 Oct 2015 in reply to Daniel Link to this post

    Hey, great! Thanks for the demo. One thing I'm concerned about; I'm trying to code this up in TypeScript, and the curveTo calls is the kendo.all.d.ts don't seem to match what you have in your createRoundedRect() body (in particular, the third parameter). The definition file contains these choices:

    curveTo(controlOut: any, controlIn: any): kendo.drawing.Path;
    curveTo(controlOut: any, controlIn: kendo.geometry.Point): kendo.drawing.Path;
    curveTo(controlOut: kendo.geometry.Point, controlIn: any): kendo.drawing.Path;
    curveTo(controlOut: kendo.geometry.Point, controlIn: kendo.geometry.Point): kendo.drawing.Path;

    Is the definition file not correct, or am I using it wrong?

     

     

     

  5. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 12 Oct 2015 Link to this post

    Hello again John,

    The issue is with the definitions. We will fix it for the next internal build.

    Regards,
    Daniel
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. John
    John avatar
    15 posts
    Member since:
    Aug 2015

    Posted 12 Oct 2015 in reply to Daniel Link to this post

    Great, thank you. :-)
  7. John
    John avatar
    15 posts
    Member since:
    Aug 2015

    Posted 12 Oct 2015 Link to this post

    Related, it appears the PDFOptions interface in the TypeScript definitions file is not quite correct:

     

    interface PDFOptions {
    creator: string;
    date: Date;
    keywords: string;
    landscape: boolean;
    margin: any;
    paperSize: any;
    subject: string;
    title: string;

    }

     

    These should all have a questionmark at the end, right, so they are optional? It's requiring that I add ALL the options, which isn't necesss

     

  8. John
    John avatar
    15 posts
    Member since:
    Aug 2015

    Posted 12 Oct 2015 Link to this post

    And... why does kendo.geometry.Rect have a constructor, but kendo.geometry.Point has static create() methods, and kendo.geometry.Class has neither a constructor or static create methods?
  9. John
    John avatar
    15 posts
    Member since:
    Aug 2015

    Posted 12 Oct 2015 Link to this post

    And... why does kendo.geometry.Rect have a constructor, but kendo.geometry.Point has static create() methods, and kendo.geometry.Class has neither a constructor or static create methods?
  10. John
    John avatar
    15 posts
    Member since:
    Aug 2015

    Posted 12 Oct 2015 Link to this post

    Sorry, yet another issue: the TypeScript definitions file doesn't have this:

     

    kendo.drawing.pdf.saveAs(...)

     Which is what's used in the example. In fact, the kendo.drawing.pdf module doesn't seem to be there at all.

     

    Is the TypeScript Definitions file behind a version, that I'm having all these issues?

     

  11. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 15 Oct 2015 Link to this post

    Thanks. We will update the definitions. 

    Regards,
    Daniel
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  12. John
    John avatar
    15 posts
    Member since:
    Aug 2015

    Posted 15 Oct 2015 in reply to Daniel Link to this post

    Thanks.... 

     Another issue: the StrokeOptions interface is requiring all fields, even though they should all be optional.

    When do you anticipate a fixed version might be available for me to use?

  13. Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 19 Oct 2015 Link to this post

    Hello John,

    We noticed this too. Will be fixed along with the Fill and PDF options. An internal build with the updates should be available by the end of the week.

    Regards,
    Daniel
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready