From: Peter S. <zu...@us...> - 2006-03-18 18:05:22
|
Update of /cvsroot/apophysis/2.10/Source In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20777/Source Modified Files: Editor.dfm Editor.pas Log Message: fixed a scrollbar bug, disabled postcoefs (again) Index: Editor.dfm =================================================================== RCS file: /cvsroot/apophysis/2.10/Source/Editor.dfm,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Editor.dfm 6 Mar 2006 15:34:53 -0000 1.32 --- Editor.dfm 18 Mar 2006 18:05:15 -0000 1.33 *************** *** 1230,1235 **** --- 1230,1237 ---- Hint = 'Reset vector X' Caption = 'X' + Enabled = False ParentShowHint = False ShowHint = True + Visible = False OnClick = btnXpostClick end *************** *** 1241,1246 **** --- 1243,1250 ---- Hint = 'Reset vector Y' Caption = 'Y' + Enabled = False ParentShowHint = False ShowHint = True + Visible = False OnClick = btnYpostClick end *************** *** 1252,1257 **** --- 1256,1263 ---- Hint = 'Reset vector O' Caption = 'O' + Enabled = False ParentShowHint = False ShowHint = True + Visible = False OnClick = btnOpostClick end *************** *** 1263,1268 **** --- 1269,1276 ---- Hint = 'Reset post-transform vectors to defaults' Caption = 'Reset post-transform' + Enabled = False ParentShowHint = False ShowHint = True + Visible = False OnClick = btnResetPostXFormClick end *************** *** 1274,1277 **** --- 1282,1286 ---- Hint = 'Swap Xform with PostXform' Caption = '[ Xform <-> PostXform ]' + Enabled = False Flat = True Font.Charset = ANSI_CHARSET *************** *** 1283,1286 **** --- 1292,1296 ---- ParentShowHint = False ShowHint = True + Visible = False OnClick = btnSwapXformsClick end *************** *** 1394,1399 **** --- 1404,1411 ---- Width = 57 Height = 21 + Enabled = False TabOrder = 8 Text = '0' + Visible = False OnExit = PostCoefValidate OnKeyPress = PostCoefKeypress *************** *** 1404,1409 **** --- 1416,1423 ---- Width = 57 Height = 21 + Enabled = False TabOrder = 9 Text = '0' + Visible = False OnExit = PostCoefValidate OnKeyPress = PostCoefKeypress *************** *** 1414,1419 **** --- 1428,1435 ---- Width = 57 Height = 21 + Enabled = False TabOrder = 10 Text = '0' + Visible = False OnExit = PostCoefValidate OnKeyPress = PostCoefKeypress *************** *** 1424,1429 **** --- 1440,1447 ---- Width = 57 Height = 21 + Enabled = False TabOrder = 11 Text = '0' + Visible = False OnExit = PostCoefValidate OnKeyPress = PostCoefKeypress *************** *** 1434,1439 **** --- 1452,1459 ---- Width = 57 Height = 21 + Enabled = False TabOrder = 12 Text = '0' + Visible = False OnExit = PostCoefValidate OnKeyPress = PostCoefKeypress *************** *** 1444,1449 **** --- 1464,1471 ---- Width = 57 Height = 21 + Enabled = False TabOrder = 13 Text = '0' + Visible = False OnExit = PostCoefValidate OnKeyPress = PostCoefKeypress Index: Editor.pas =================================================================== RCS file: /cvsroot/apophysis/2.10/Source/Editor.pas,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** Editor.pas 8 Mar 2006 14:21:36 -0000 1.38 --- Editor.pas 18 Mar 2006 18:05:15 -0000 1.39 *************** *** 315,319 **** TriangleView: TCustomDrawControl; cmap: TColorMap; - // cp1: TControlPoint; PreviewDensity: double; --- 315,318 ---- *************** *** 323,326 **** --- 322,326 ---- modeKey: word; key_handled: boolean; + updating: boolean; MousePos: TPoint; // in screen coordinates *************** *** 671,674 **** --- 671,676 ---- strval: string; begin + updating := true; + if (SelectedTriangle > LastTriangle) then SelectedTriangle := LastTriangle; *************** *** 762,765 **** --- 764,769 ---- PageControl.Refresh; + + updating := false; end; *************** *** 783,787 **** xmaxz := 0; ymaxz := 0; ! for i := -1 to Transforms - 1 do begin for j := 0 to 2 do --- 787,791 ---- xmaxz := 0; ymaxz := 0; ! for i := -1 to LastTriangle do begin for j := 0 to 2 do *************** *** 811,827 **** i: integer; begin - for i := 0 to Transforms do - begin - // CP_compute(cp1, Triangles[i], Triangles[-1], i); - solve3(MainTriangles[-1].x[0], MainTriangles[-1].y[0], MainTriangles[i].x[0], - MainTriangles[-1].x[1], MainTriangles[-1].y[1], MainTriangles[i].x[1], - MainTriangles[-1].x[2], MainTriangles[-1].y[2], MainTriangles[i].x[2], - cp.xform[i].c[0][0], cp.xform[i].c[1][0], cp.xform[i].c[2][0]); - - solve3(MainTriangles[-1].x[0], MainTriangles[-1].y[0], MainTriangles[i].y[0], - MainTriangles[-1].x[1], MainTriangles[-1].y[1], MainTriangles[i].y[1], - MainTriangles[-1].x[2], MainTriangles[-1].y[2], MainTriangles[i].y[2], - cp.xform[i].c[0][1], cp.xform[i].c[1][1], cp.xform[i].c[2][1]); - end; cp.GetFromTriangles(MainTriangles, Transforms); if not chkPreserve.checked then cp.ComputeWeights(MainTriangles, Transforms); --- 815,818 ---- *************** *** 2009,2015 **** MainTriangles[Transforms+1] := MainTriangles[Transforms]; cp.xform[Transforms+1].Assign(cp.xform[Transforms]); ! MainTriangles[Transforms] := MainTriangles[SelectedTriangle]; ! cp.xform[Transforms].Assign(cp.xform[SelectedTriangle]); ! SelectedTriangle := Transforms; Inc(Transforms); cbTransforms.clear; --- 2000,2010 ---- MainTriangles[Transforms+1] := MainTriangles[Transforms]; cp.xform[Transforms+1].Assign(cp.xform[Transforms]); ! if SelectedTriangle <> Transforms then ! begin ! MainTriangles[Transforms] := MainTriangles[SelectedTriangle]; ! cp.xform[Transforms].Assign(cp.xform[SelectedTriangle]); ! SelectedTriangle := Transforms; ! end ! else cp.xform[Transforms].density := 0.5; Inc(Transforms); cbTransforms.clear; *************** *** 2527,2530 **** --- 2522,2527 ---- v: double; begin + if updating then exit; + v := (scrlXFormColor.Position) / scrlXFormColor.Max; cp.xform[SelectedTriangle].color := v; *************** *** 3813,3817 **** pnlDragOld := x; varMM := false; ! SetCaptureControl(TControl(Sender)); Screen.Cursor := crHSplit; GetCursorPos(mousepos); // hmmm --- 3810,3815 ---- pnlDragOld := x; varMM := false; ! //SetCaptureControl(TControl(Sender)); ! Screen.Cursor := crHSplit; GetCursorPos(mousepos); // hmmm *************** *** 3863,3869 **** cp.xform[SelectedTriangle].color := v; pnlXFormColor.Color := ColorValToColor(cp.cmap, v); scrlXformColor.Position := round(v*1000); pEdit := @txtXformColor; ! end; pEdit^.Text := FloatToStr(v); // Format('%.6g', [v]) //pEdit.Refresh; --- 3861,3870 ---- cp.xform[SelectedTriangle].color := v; pnlXFormColor.Color := ColorValToColor(cp.cmap, v); + updating := true; scrlXformColor.Position := round(v*1000); pEdit := @txtXformColor; ! updating := false; ! end ! else assert(false); pEdit^.Text := FloatToStr(v); // Format('%.6g', [v]) //pEdit.Refresh; *************** *** 3880,3884 **** if pnlDragMode then begin ! SetCaptureControl(nil); pnlDragMode := false; Screen.Cursor := crDefault; --- 3881,3886 ---- if pnlDragMode then begin ! //SetCaptureControl(nil); ! pnlDragMode := false; Screen.Cursor := crDefault; |