您现在的位置:网站首页 > 心情日志 > 鞋业CAD软件柔性内核技术:源码[9]
设计师介绍:

昵称:烦夫子
类别:界面/平面设计师
年龄:37
现所在地:北京

查看该设计师的主页>>

关注好友

统计中心

主页浏览总数:24105
总积分:89
文章数:88
作品数:70

鞋业CAD软件柔性内核技术:源码[9]

作者:烦夫子  更新时间: 2007-11-19   浏览人数:17106  评论:0  
分享到:
源码工程:
 
                        柔性图形内核之九
                        Shape
 
//应用于CAD/CAM图形类程序设计
//我将逐步开放数以十万记的自主版权软件源码,谢谢大家的支持!
//以后将开源的项目: CAD、工控、机械设计图、电子布线图等
 

// Shape.h: interface for the Shape class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SHAPE_H__F48A9625_CB54_49FD_B989_7F8939F480FF__INCLUDED_)
#define AFX_SHAPE_H__F48A9625_CB54_49FD_B989_7F8939F480FF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Object.h"

enum ShapeNum {SPoint = 11, SLine, SRectangle, SCircle, SArc, SEllipse, SCurve,SHole};

class SOFTDRAW_CLASS Shape : public Object
{

public:
 Vector p1, p2, p3, p4;
 float radius;
 float stangle, edangle;
 float a, b;
 int     previewmode;
    float   HoleRadius;
    float   ASRadius, AHRadius;
public:
 WORD shape;
 Shape (const Object * p = NULL);
 Shape (const Object * p, Vector& v1);
 Shape (const Object * p, Vector& v1, Vector& v2);
 Shape (const Object * p, Vector& v1, Vector& v2, Vector& v3, Vector& v4);
 Shape (const Object * p, Vector& v1, float rr);
 Shape (const Object * p, Vector& v1, float rr, float sta, float eda);
 Shape (const Object * p, Vector& v1, float a, float b);
    Shape (const Object * p, Vector& v1,BOOL bChange);

    void Draw (CDC* hDC, float scale, DrawMode mode, int dispmode) const;
 void FastDraw (CDC* dc, float scale, DrawMode mode, TransformFunc f) const;
 void DrawOrder(CDC* hDC, float scale, DrawMode mode) const;       //绘次序
    void DrawNodes (CDC* dc, float scale, DrawMode mode) const;       //绘节点
 void DrawBox (CDC* dc, float scale, int index, DrawMode mode) const;

 BOOL IsInRegion (CRgn *region) const;
 float GetLength() const;
 void GetMinMax ();
 long GetSize () const;

public:
 Object& ōperator = (const Object& aObject);
 BOOL operator ^ (const Object& aObject);
 BOOL ōperator == (const Object& aObject);

 DECLARE_IO_METHOD (Shape)
};

#endif // !defined(AFX_SHAPE_H__F48A9625_CB54_49FD_B989_7F8939F480FF__INCLUDED_)

(目前有0人发表看法,  我要发表评论
我要评论:
  只有登录后才能评论!
评论者: 匿名游客    (立即登录 或 注册)