• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Revision4c01794c872d73c4f2f3d05cb43c659206340ea4 (tree)
Time2014-11-02 23:04:23
AuthorHans Breuer <hans@breu...>
CommiterHans Breuer

Log Message

[transform] don't change image size to simulate rotation

still missing the capability to actually rotate the pixels.

Change Summary

Incremental Difference

--- a/lib/diatransformrenderer.c
+++ b/lib/diatransformrenderer.c
@@ -472,26 +472,18 @@ draw_image(DiaRenderer *self,
472472 DiaImage *image)
473473 {
474474 Point p1 = *point;
475- Point p2 = p1;
475+ Point pc = p1;
476476 DiaTransformRenderer *renderer = DIA_TRANSFORM_RENDERER (self);
477477 DiaMatrix *m = g_queue_peek_tail (renderer->matrices);
478478 g_return_if_fail (renderer->worker != NULL);
479479
480480 /* ToDo: some support on the library level? */
481- p2.x += width;
482- p2.y += height;
481+ pc.x += width/2.0;
482+ pc.y += height/2.0;
483483 if (m) {
484- transform_point (&p1, m);
485- transform_point (&p2, m);
486- /* don't reduce to negative */
487- if (p2.x > p1.x)
488- width = p2.x - p1.x;
489- else
490- width = p1.x - p2.x;
491- if (p2.y > p1.y)
492- height = p2.y - p1.y;
493- else
494- height = p1.y - p2.y;
484+ transform_point (&pc, m);
485+ p1.x = pc.x - width/2.0;
486+ p1.y = pc.y - height/2.0;
495487 }
496488 /* FIXME: for now only the position is transformed */
497489 DIA_RENDERER_GET_CLASS (renderer->worker)->draw_image (renderer->worker, &p1, width, height, image);