@@ -362,9 +362,6 @@ void View::DrawDivLine(DeviceContext *dc, LayerElement *element, Layer *layer, S
362
362
DivLine *divLine = dynamic_cast <DivLine *>(element);
363
363
assert (divLine);
364
364
365
- // int x = divLine->GetDrawingX();
366
- // int y = divLine->GetDrawingY();
367
-
368
365
dc->StartGraphic (element, " " , element->GetID ());
369
366
370
367
int sym = 0 ;
@@ -380,29 +377,14 @@ void View::DrawDivLine(DeviceContext *dc, LayerElement *element, Layer *layer, S
380
377
}
381
378
382
379
int x, y;
383
- if (m_doc->IsFacs () && (divLine->HasFacs ())) {
384
- x = divLine->GetDrawingX ();
385
- y = ToLogicalY (staff->GetDrawingY ());
386
- }
387
- else {
388
- x = element->GetDrawingX ();
389
- y = element->GetDrawingY ();
390
- y -= m_doc->GetDrawingUnit (staff->m_drawingStaffSize );
391
- }
380
+ x = element->GetDrawingX ();
381
+ y = element->GetDrawingY ();
392
382
393
383
y -= (m_doc->GetDrawingUnit (staff->m_drawingStaffSize )) * 3 ;
394
384
395
- int rotationOffset = 0 ;
396
- if (m_doc->IsFacs () && (staff->GetDrawingRotate () != 0 )) {
397
- double deg = staff->GetDrawingRotate ();
398
- int xDiff = x - staff->GetDrawingX ();
399
- rotationOffset = int (xDiff * tan (deg * M_PI / 180.0 ));
385
+ if (staff->HasDrawingRotation ()) {
386
+ y -= staff->GetDrawingRotationOffsetFor (x);
400
387
}
401
- else if (staff->HasDrawingRotation ()) {
402
- rotationOffset = staff->GetDrawingRotationOffsetFor (x);
403
- }
404
-
405
- y -= rotationOffset;
406
388
407
389
DrawSmuflCode (dc, x, y, sym, staff->m_drawingStaffSize , false , true );
408
390
0 commit comments