aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/RealTimeGraphEx/FastGraphs/RealTimeGraphExWaveErase.cs
blob: 06ef8ffa01d6a36d9e2972a0b4269d7f78aa0735 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace RealTimeGraphEx.FastGraphs
{
    public class RealTimeGraphExWaveErase : RealTimeGraphExLineErase
    {
        #region Constructors

        public RealTimeGraphExWaveErase()
            : base()
        {

        }

        #endregion

        #region Override Methods

        /// <summary>
        /// Set the cross thread fields.
        /// </summary>
        protected override void OnSetCrossThreadFields()
        {
            base.OnSetCrossThreadFields();

            this.Dispatcher.Invoke(() =>
            {

                _minimum = _maximum * -1;

            }, System.Windows.Threading.DispatcherPriority.Send);
        }

        /// <summary>
        /// Draw the actual polygon on the image.
        /// </summary>
        /// <param name="bmp"></param>
        protected override void OnDrawVisuals(WriteableBitmap bmp)
        {
            Color stroke = _graphController.dataSeries.GetStrokeColor() != null ? _graphController.dataSeries.GetStrokeColor().Value : _stroke;
            Color fill = _graphController.dataSeries.GetFillColor() != null ? _graphController.dataSeries.GetFillColor().Value : _fill;
            double scale = GetPolygonScaleFactor();
            double currentWidth = _endReached ? _width : xValueCounter;


            if (_fillGraph) //Fill Graph
            {
                bmp.FillPolygon(graphPolygon.ToPolygonPointsWaveFill(_offSetX, _offSetY, _width, _height, scale, ConvertYToImageYFliped), fill);
            }

            DrawPolyline(bmp, graphPolygon.ToPolygonPoints(_offSetX, _offSetY, scale, ConvertYToImageYFliped), stroke);
            DrawPolyline(bmp, graphPolygon.ToPolygonPointsReflection(_offSetX, _offSetY, _height, scale, ConvertYToImageYFliped), stroke);

            //Draw marker
            if (_showMarker)
            {
                if (_currentReplaceIndex > 0)
                {
                    double x = ((_currentReplaceIndex * scale) + _offSetX);
                    bmp.DrawLine((int)x, 0, (int)x, (int)_mainHeight, _markerColor);
                }
            }

            if (_enableMarkerPosition)
            {
                MarkerPosition = new Point((_currentReplaceIndex * scale) + _offSetX, ConvertYToImageYFliped(lastVirtualValue) + _offSetY);
            }
        }

        #endregion
    }
}
to // =================================================================== class ExternalClientLoginRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:Tango.PMR.Integration.ExternalClientLoginRequest) */ { public: ExternalClientLoginRequest(); virtual ~ExternalClientLoginRequest(); ExternalClientLoginRequest(const ExternalClientLoginRequest& from); inline ExternalClientLoginRequest& operator=(const ExternalClientLoginRequest& from) { CopyFrom(from); return *this; } #if LANG_CXX11 ExternalClientLoginRequest(ExternalClientLoginRequest&& from) noexcept : ExternalClientLoginRequest() { *this = ::std::move(from); } inline ExternalClientLoginRequest& operator=(ExternalClientLoginRequest&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); } else { CopyFrom(from); } return *this; } #endif static const ::google::protobuf::Descriptor* descriptor(); static const ExternalClientLoginRequest& default_instance(); static inline const ExternalClientLoginRequest* internal_default_instance() { return reinterpret_cast<const ExternalClientLoginRequest*>( &_ExternalClientLoginRequest_default_instance_); } static PROTOBUF_CONSTEXPR int const kIndexInFileMessages = 0; void Swap(ExternalClientLoginRequest* other); friend void swap(ExternalClientLoginRequest& a, ExternalClientLoginRequest& b) { a.Swap(&b); } // implements Message ---------------------------------------------- inline ExternalClientLoginRequest* New() const PROTOBUF_FINAL { return New(NULL); } ExternalClientLoginRequest* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; void CopyFrom(const ExternalClientLoginRequest& from); void MergeFrom(const ExternalClientLoginRequest& from); void Clear() PROTOBUF_FINAL; bool IsInitialized() const PROTOBUF_FINAL; size_t ByteSizeLong() const PROTOBUF_FINAL; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL; int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const PROTOBUF_FINAL; void InternalSwap(ExternalClientLoginRequest* other); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return NULL; } inline void* MaybeArenaPtr() const { return NULL; } public: ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // string Password = 1; void clear_password(); static const int kPasswordFieldNumber = 1; const ::std::string& password() const; void set_password(const ::std::string& value); #if LANG_CXX11 void set_password(::std::string&& value); #endif void set_password(const char* value); void set_password(const char* value, size_t size); ::std::string* mutable_password(); ::std::string* release_password(); void set_allocated_password(::std::string* password); // @@protoc_insertion_point(class_scope:Tango.PMR.Integration.ExternalClientLoginRequest) private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; ::google::protobuf::internal::ArenaStringPtr password_; mutable int _cached_size_; friend struct protobuf_ExternalClientLoginRequest_2eproto::TableStruct; }; // =================================================================== // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS #ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ // ExternalClientLoginRequest // string Password = 1; inline void ExternalClientLoginRequest::clear_password() { password_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& ExternalClientLoginRequest::password() const { // @@protoc_insertion_point(field_get:Tango.PMR.Integration.ExternalClientLoginRequest.Password) return password_.GetNoArena(); } inline void ExternalClientLoginRequest::set_password(const ::std::string& value) { password_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:Tango.PMR.Integration.ExternalClientLoginRequest.Password) } #if LANG_CXX11 inline void ExternalClientLoginRequest::set_password(::std::string&& value) { password_.SetNoArena( &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:Tango.PMR.Integration.ExternalClientLoginRequest.Password) } #endif inline void ExternalClientLoginRequest::set_password(const char* value) { GOOGLE_DCHECK(value != NULL); password_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:Tango.PMR.Integration.ExternalClientLoginRequest.Password) } inline void ExternalClientLoginRequest::set_password(const char* value, size_t size) { password_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast<const char*>(value), size)); // @@protoc_insertion_point(field_set_pointer:Tango.PMR.Integration.ExternalClientLoginRequest.Password) } inline ::std::string* ExternalClientLoginRequest::mutable_password() { // @@protoc_insertion_point(field_mutable:Tango.PMR.Integration.ExternalClientLoginRequest.Password) return password_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ExternalClientLoginRequest::release_password() { // @@protoc_insertion_point(field_release:Tango.PMR.Integration.ExternalClientLoginRequest.Password) return password_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void ExternalClientLoginRequest::set_allocated_password(::std::string* password) { if (password != NULL) { } else { } password_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), password); // @@protoc_insertion_point(field_set_allocated:Tango.PMR.Integration.ExternalClientLoginRequest.Password) } #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // @@protoc_insertion_point(namespace_scope) } // namespace Integration } // namespace PMR } // namespace Tango // @@protoc_insertion_point(global_scope) #endif // PROTOBUF_ExternalClientLoginRequest_2eproto__INCLUDED