-
Notifications
You must be signed in to change notification settings - Fork 136
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
Get separated element by it's id. #106
Comments
This issue is come up several times and we have resolved them but not settle it. Basically, you will need to perform hit-test or search through the For a start, any id attached to an SVG element is passed to the converted drawing. Any CSS class name is also attached to the converted drawing.
That is about participating in the conversion process itself not after. By the end of this weekend, I will try to make the necessary interfaces more accessible. Give me a little more time so that I could completely address this issue. Currently trying to complete the SVG font support task #9. |
Thanks, I will look up for it. It's just for little side project at the moment, so no hurry :) |
- Improved the WpfDrawingDrawing object implementation - Added support for hit-testing by point and rectangle - Added a sample, WpfTestSvgControl, for testing this feature - Modified the codes to make the SetId value same as the SVG ID - This is the first step in support for interactivities and resolve the issue #106
@Audionysos Hello! Sorry for the delay. I have started implementing a new class
Both of these could make the ID not compatible with the original ID defined in the SVG file. The Finally, I have created a sample application Now, please can you test this code and provide feedback for improvements? After these I will modify the |
Hello, I actually didn't expect from you to be that quick :) I've only find out that you responded about half a year ago and I played around with this but I didn't finish what I wanted, then I couldn't find the project I made and now I just moved back to in yesterday and made some progress. So this seem to work. I made a little explorer class based on the public MainWindow() {
InitializeComponent();
var d = new SVGExplorer("data/test.svg");
Content = d.view;
d["star"].look.fill = Brushes.Black;
d["star"].events.mouse.DOWN += (s, e) => {
var r = d["rect815"];
r.look.toggleVisibility();
};
d["path821"].transform.pivot.toMassCenter();
d["rect815"].events.mouse.DOWN += (s, e) => {
var o = d["path821"];
o.transform.x += 30;
if (o.transform.x > 300) o.transform.x = 0;
o.transform.scale *= 1.5;
if (o.transform.scale > 3) o.transform.scale = 1;
o.transform.rotation += 20;
};
} Now, I still didn't figure out few things.
When I move the point in Inkscape, I see Inkscape saves this as |
Really nice work you are doing with this stuff, highly impressive.
True, the initial release was experimental and the updated version even add more information to the drawings that are I have posted a pull request to your repository, so you can take a look at the updates to make it work.
It is one of the puzzle I have still not resolved yet. At the WPF low-level, that flexibility of simple changing characters is not there, so you may need to recreate the The main problem is when the text is rendered as
|
Hi,
Is there a way I could get some portion of the drawing by it's "id" attribute? I'm currently loading the drawing via
SvgViewBox
but from what I see this only produces rawGeometryDrawing
instances on drawing canvas that I cannot identify. Is there any way I can do this at the moment?On top page you wrote "Interaction with the conversion process (by a visitor pattern) to allow for custom hyper-link implementations, font substitutions etc." by I'm not sure if this is what I need and can't find example of that.
Basically I have drawn some buttons in illustrator and would like modify some basic stuff at runtime - toggle visibility, maybe change some background, or size. Can I force converter to output WPF Grids for named elements?
The text was updated successfully, but these errors were encountered: