Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StarTool_PentagonTool_TriangleTool and related files are missing from pod version #28

Closed
sameer4 opened this issue Jul 5, 2019 · 8 comments

Comments

@sameer4
Copy link

sameer4 commented Jul 5, 2019

Hi first thanks for the library. Second, pod version have some files missing.

StarTool_PentagonTool_TriangleTool
StarShape
NgonShape

and can you open DrawingToolForShapeWithTwoPoints so i can manually add or create new shapes of needed?
for now adding StarTool_PentagonTool_TriangleTool results in

Cannot inherit from non-open class 'DrawingToolForShapeWithTwoPoints' outside of its defining

@sameer4 sameer4 changed the title StarTool_PentagonTool_TriangleTool and related files are missing form pod installation StarTool_PentagonTool_TriangleTool and related files are missing from pod version Jul 5, 2019
@sameer4
Copy link
Author

sameer4 commented Jul 5, 2019

I'm not seeing mention of StarTool, PentagonTool or TriangleTool in description on main page. so i guess missing files are intended behaviour. but can you please just open the access level for me to add shapes manually?

@sameer4
Copy link
Author

sameer4 commented Jul 5, 2019

needed some more changes like positions of shapes draw and etc.so removing from pod and adding manually in the project to customise it for my needs

@stevelandeyasana
Copy link
Collaborator

These are reasonable requests. I'm behind on doing a release.

@stevelandeyasana
Copy link
Collaborator

Please submit a PR with your changes!

@sameer4
Copy link
Author

sameer4 commented Jul 9, 2019

As i mentioned, i just included it to my project for modifications.

For DrawingToolForShapeWithTwoPoints to be accessible outside module, we have to use open access level but open access level can not be applied to protocols so we can not make

var name: String

from DrawingTool

open.1st issue.

2nd didn't had the time to modify it much so i'm just accessing shapes in

func drawsanaView(_ drawsanaView: DrawsanaView, didEndDragWith tool: DrawingTool) {

    DLog("sam tool = \(tool.name) ")
    
    if let shape = drawingView.drawing.shapes.last as? PenShape {
        for segment in shape.segments {
            DLog("sam tool = \(tool.name) and rect = (\(segment.a),\(segment.b)) ")
        }
    } else if let shape = drawingView.drawing.shapes.last as? CircleShape {
        DLog("sam tool = \(tool.name) and rect = \(shape.squareRect) = (\(shape.a),\(shape.b)) ")
    } else if let shape = drawingView.drawing.shapes.last as? NgonShape {
        DLog("sam tool = \(tool.name) and rect = \(shape.rect) ")
    } else if let shape = drawingView.drawing.shapes.last as? StarShape {
        DLog("sam tool = \(tool.name) and rect = \(shape.rect) ")
    }
}

@stevelandeyasana
Copy link
Collaborator

Fixed!

@sameer4
Copy link
Author

sameer4 commented Feb 23, 2021

Hi @stevelandeyasana. i was updating the library back to pod. There's some way to get points of shape?

@sameer4
Copy link
Author

sameer4 commented Feb 23, 2021

let me open new thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants